|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.AbstractButton
javax.swing.JButton
leon.view.win.swing.component.LyJButton
public class LyJButton
This class implements a simple label with an image.
Nested Class Summary | |
---|---|
class |
LyJButton._LyJButtonModel
This class is used as ButtonModel for LyJButton. |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.BaselineResizeBehavior |
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
static java.awt.Color |
FOCUS_COLOR
Color of the focus for the default look and feel. |
static int |
TIP_MAX_CHARS
The maximum number of characters of this button tooltip. |
Fields inherited from class javax.swing.AbstractButton |
---|
BORDER_PAINTED_CHANGED_PROPERTY, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY |
Fields inherited from class javax.swing.JComponent |
---|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.SwingConstants |
---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
LyJButton(java.awt.Image image)
Creates a new Button component with the specified options. |
|
LyJButton(java.awt.Image image,
java.lang.String tooltip)
Creates a new Button component with the specified options. |
|
LyJButton(java.awt.Image image,
java.lang.String label,
java.lang.String tooltip,
java.lang.String id)
Creates a new Button component with the specified options. |
|
LyJButton(java.awt.Image image,
java.lang.String label,
java.lang.String tooltip,
java.lang.String id,
boolean rollover)
Creates a new Button component with the specified options. |
|
LyJButton(java.lang.String label)
Creates a new Button component with the specified options. |
|
LyJButton(java.lang.String label,
java.awt.Image image)
Creates a new Button component with the specified options. |
|
LyJButton(java.lang.String label,
java.awt.Image image,
boolean rollover)
Creates a new Button component with the specified options. |
|
LyJButton(java.net.URL url,
java.awt.Image image,
java.lang.String label,
java.lang.String tooltip,
java.lang.String id)
Creates a new Button component with the specified options. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
(non-Javadoc). |
void |
callActionPerformed(java.awt.event.ActionEvent e)
Performes the specified action. |
LyActionTransmitter |
getActionTransmitter()
(non-Javadoc). |
java.lang.String |
getId()
(non-Javadoc). |
java.awt.Image |
getImage()
Gets the image of this button. |
java.awt.Insets |
getInsets()
Compacts toobars. |
LySelectionTransmitter |
getSelectionTransmitter()
This button doesn't handle selection events, so it has no selection transmitter. |
java.awt.Point |
getToolTipLocation(java.awt.event.MouseEvent event)
Deactivate multiple mouse enter on buttons. |
boolean |
hasFocus()
(non-Javadoc). |
void |
init()
Registers the action and mouse listeners of this button. |
void |
mouseClicked(java.awt.event.MouseEvent e)
Used to manage the repeat mode. |
void |
mouseEntered(java.awt.event.MouseEvent e)
Doesn't do anything. |
void |
mouseExited(java.awt.event.MouseEvent e)
Used to manage the repeat mode. |
void |
mousePressed(java.awt.event.MouseEvent e)
Used to manage the repeat mode. |
void |
mouseReleased(java.awt.event.MouseEvent e)
Used to manage the repeat mode. |
void |
propertyChange(java.beans.PropertyChangeEvent e)
Generates a warning message on the standard output. |
void |
setEnabled(boolean b)
(non-Javadoc). |
void |
setEnvironment(LyEnvironment environment)
Sets the environment of the button. |
void |
setFont(java.awt.Font font)
(non-Javadoc). |
void |
setGrayProp(int grayProp)
Sets the gray proportion of the image used when mouse is not over the button. |
void |
setImage(java.awt.Image image)
Sets the image displayed by the button. |
void |
setImage(java.net.URL url,
java.awt.Image image)
Sets the image displayed by the button. |
void |
setOpenerButton(LyJOpenerButton openerButton)
Sets the opener button associated with current one. |
void |
setRepeatEnabled(boolean repeat)
Activates or deactivates repeat mode. |
void |
setRollover(boolean roll)
Sets the rollover property of this boolean. |
void |
setRolloverChangeBackground(boolean rollover)
Indicates if background must be changed when mouse is over the button. |
void |
setRolloverEnabled(boolean roll)
(non-Javadoc). |
void |
setUI(javax.swing.plaf.ButtonUI ui)
(non-Javadoc). |
java.lang.String |
toString()
Prints the content of this button object. |
Methods inherited from class javax.swing.JButton |
---|
getAccessibleContext, getUIClassID, isDefaultButton, isDefaultCapable, removeNotify, setDefaultCapable, updateUI |
Methods inherited from class javax.swing.AbstractButton |
---|
addActionListener, addChangeListener, addItemListener, doClick, doClick, getAction, getActionCommand, getActionListeners, getChangeListeners, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getHideActionText, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getItemListeners, getLabel, getMargin, getMnemonic, getModel, getMultiClickThreshhold, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, isSelected, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setFocusPainted, setHideActionText, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabel, setLayout, setMargin, setMnemonic, setMnemonic, setModel, setMultiClickThreshhold, setPressedIcon, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setVerticalAlignment, setVerticalTextPosition |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hide, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String __VERSION
public static int TIP_MAX_CHARS
public static java.awt.Color FOCUS_COLOR
Constructor Detail |
---|
public LyJButton(java.lang.String label)
This button is double buffered.
label
- the label of this buttonpublic LyJButton(java.lang.String label, java.awt.Image image)
This button is double buffered.
image
- the image to associate to the buttonlabel
- the label of this buttonpublic LyJButton(java.lang.String label, java.awt.Image image, boolean rollover)
This button is double buffered.
image
- the image to associate to the buttonlabel
- the label of this buttonrollover
- the rollover propertypublic LyJButton(java.awt.Image image)
This button is double buffered.
image
- the image to associate to the buttonpublic LyJButton(java.awt.Image image, java.lang.String tooltip)
This button is double buffered.
image
- the image to associate to the buttontooltip
- the tooltippublic LyJButton(java.awt.Image image, java.lang.String label, java.lang.String tooltip, java.lang.String id)
This button is double buffered.
image
- the image to associate to the buttonlabel
- the label of this buttontooltip
- the tooltipid
- the identifier stringpublic LyJButton(java.net.URL url, java.awt.Image image, java.lang.String label, java.lang.String tooltip, java.lang.String id)
This button is double buffered.
url
- the image url to associate to the buttonimage
- the image to associate to the buttonlabel
- the label of this buttontooltip
- the tooltipid
- the identifier stringpublic LyJButton(java.awt.Image image, java.lang.String label, java.lang.String tooltip, java.lang.String id, boolean rollover)
This button is double buffered.
image
- the image to associate to the buttonlabel
- the label of this buttontooltip
- the tooltipid
- the identifier stringrollover
- the rollover propertyMethod Detail |
---|
public void init()
public void setRollover(boolean roll)
Workaround for Swing UI bug where rollover deactivates itself.
roll
- the rollover propertysetRolloverEnabled(boolean)
public void setRolloverEnabled(boolean roll)
setRolloverEnabled
in class javax.swing.AbstractButton
AbstractButton.setRolloverEnabled(boolean)
public void setRolloverChangeBackground(boolean rollover)
rollover
- Indicates if the change background mode is activated.public void setGrayProp(int grayProp)
grayProp
- Indicates the new gray proportion.public void setImage(java.awt.Image image)
image
- the new icon imagegetImage()
public void setImage(java.net.URL url, java.awt.Image image)
image
- the new icon imagepublic java.awt.Image getImage()
setImage(Image)
public void setFont(java.awt.Font font)
setFont
in class javax.swing.JComponent
Component.setFont(java.awt.Font)
public void setRepeatEnabled(boolean repeat)
repeat
- Indicates if the repeat mode is activated.public void setEnvironment(LyEnvironment environment)
environment
- the environment of the button.public void setEnabled(boolean b)
setEnabled
in class javax.swing.AbstractButton
Component.setEnabled(boolean)
public boolean hasFocus()
hasFocus
in class java.awt.Component
Component.hasFocus()
public void callActionPerformed(java.awt.event.ActionEvent e)
e
- an action eventpublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
ActionListener.actionPerformed(java.awt.event.ActionEvent)
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
MouseListener.mousePressed(java.awt.event.MouseEvent)
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
MouseListener.mouseReleased(java.awt.event.MouseEvent)
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
MouseListener.mouseClicked(java.awt.event.MouseEvent)
public void setOpenerButton(LyJOpenerButton openerButton)
openerButton
- the new opener button associated with current one.public java.awt.Insets getInsets()
getInsets
in class javax.swing.JComponent
JComponent.getInsets()
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
MouseListener.mouseEntered(java.awt.event.MouseEvent)
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
MouseListener.mouseExited(java.awt.event.MouseEvent)
public LyActionTransmitter getActionTransmitter()
getActionTransmitter
in interface LyEventTransmitter
LyEventTransmitter.getActionTransmitter()
public LySelectionTransmitter getSelectionTransmitter()
getSelectionTransmitter
in interface LyEventTransmitter
null
LyEventTransmitter.getSelectionTransmitter()
public java.lang.String getId()
getId
in interface LyGetIdInterface
LyGetIdInterface.getId()
public java.lang.String toString()
toString
in class java.awt.Component
public void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange
in interface java.beans.PropertyChangeListener
PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)
public java.awt.Point getToolTipLocation(java.awt.event.MouseEvent event)
getToolTipLocation
in class javax.swing.JComponent
JComponent.getToolTipLocation(java.awt.event.MouseEvent)
public void setUI(javax.swing.plaf.ButtonUI ui)
setUI
in class javax.swing.AbstractButton
AbstractButton.setUI(javax.swing.plaf.ButtonUI)
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |