public class ButtonListGuiImpl.Item extends BorderedPanelGuiImpl
Modifier and Type | Field and Description |
---|---|
private ButtonListGroupItemConfig |
config
The item's configuration
|
private ButtonListGuiImpl.Items |
container
Its parent container
|
private ImageGuiImpl |
image
The item's icon
|
private TextCell |
textWidget
The item's label
|
border
location, mousePtr, nativeInsets, physicalLocation
Constructor and Description |
---|
Item(ButtonListGroupItemConfig config,
ButtonListGuiImpl.Items container)
Creates the item panel from the given configuration.
|
Modifier and Type | Method and Description |
---|---|
ButtonListGroupItemConfig |
config()
References its configuration.
|
void |
createOrUpdateComponents()
Creates or updates item's image and label.
|
Dimension |
dimension()
Returns its dimension in character units.
|
Widget<GuiOutputManager> |
findMouseSource(NativePoint p)
Find the item under the mouse pointer.
|
double |
height()
Returns its height in character units.
|
protected int[] |
mouseActions()
Determine the mouse actions processed by this widget.
|
void |
mouseClicked(java.awt.event.MouseEvent e)
Delegates the mouse clicked event to its button list widget.
|
void |
mouseDragged(java.awt.event.MouseEvent e)
Delegates the mouse dragged event occurred for this widget to its button list widget.
|
void |
mouseEntered(java.awt.event.MouseEvent e)
Selects this item.
|
void |
mouseExited(java.awt.event.MouseEvent e)
Exits this item.
|
void |
mouseMoved(java.awt.event.MouseEvent e)
Delegates the mouse moved event occurred for this widget to its button list widget.
|
void |
mousePressed(java.awt.event.MouseEvent e)
Delegates the mouse pressed event occurred for this widget to its button list widget.
|
void |
mouseReleased(java.awt.event.MouseEvent e)
Delegates the mouse released event occurred for this widget to its button list widget.
|
void |
setSelected(boolean isSelected) |
void |
setSize(double width,
double height)
Update the item size.
|
void |
updateFont(int font)
Updates the current item font.
|
void |
updateSize(double rowWidth,
double rowHeight)
Updates its size based on the dimension of its visible row.
|
double |
width()
Returns its width in character units.
|
draw, drawPanel, getId, is3DBorder, isRMBEntrySupported, set3DBorder, setColorResolver, setCustomDraw, setId, setOptionalDraw
border, insets, isTransparent, setBorder, setTransparent
add, add, add, addContainerStateListener, addDirectly, belongsTo, checkWidget, childrenLocation, clipping, clipRectangle, copyState, currentFocus, currentFocus, cycleFocus, defaultFocus, deregisterSelectedWidget, destroy, detach, doLayout, dumpCurrentWidgets, dumpWidgets, endSizeChange, firstFocus, focus, focusTraversable, focusWorker, formatDump, get, getAllSelectedWidgets, getClipRect, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, getTabItemList, hasFocusable, lastFocus, minimumSize, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, nextFocus, normalizeZOrder, onWidgetAdded, onWidgetRemoved, paintOnTop, parentOf, prepareWidgets, prevFocus, processKeyEvent, reflectAncestorChange, reflectLocationChange, registerSelectedWidget, remove, removeContainerStateListener, repaint, replace, requestFocus, requestFocus, setFocus, setFocusInt, setHeight, setIgnoreFocus, setInsets, setLayout, setSize, setTabItemList, setWidth, startSizeChange, triggerContainerStateRedrawEnabled, unrealize, updateSizeWorker, widgets, widgetsAsList, widgetStateChanged
_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, copyColors, createMouseHoverAction, deactivateDirectManipulation, debug, disable, disableTooltip, displayPhysicalLocation, drawCaret, enable, enableTooltip, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCachedScreenLocation, getCachedScreenPhysicalLocation, getCustomMousePointer, getDefaultEvent, getEffectiveMousePointer, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getPortableMouseEventCoordinates, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextHeightNative, getTextWidth, getTextWidth, getTextWidthNative, getTextWidthNative, getVisiblePart, getZOrderClass, hasFocus, hidden, hide, highlighted, ignoreAction, initialHeight, initialWidth, isCurrent, isDirectManipulationActive, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isFocusable, isHeader, isMouseDrag, isRealized, isRepaintDisabled, isScreenLocationCached, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, manageSystemActions, mouseWheelMoved, moveToBottom, moveToTop, name, navigable, oleDoDrop, oleDrag, oleDragging, oleStartDragging, onOleDragging, onOleDropEnd, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, prepParentLocation, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyEventForSelectableWidget, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, refresh, registerWidgetStateListener, repaint, repaint, requestSync, resetBitmap, resizeTo, resolveFont, resolvePopupMenuId, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, show, showPopupMenu, supportsCustomMousePointer, sync, topLevelWindow, toString, translate, unregisterWidgetStateListener, window
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
widgetsAsList
addFocusListener, addKeyListener, ancestor, ancestorId, bounds, canMovetoTop, clearWidget, defaultMousePtr, displayPhysicalLocation, drawCaret, enclosingFrame, enforceDefaultMousePtr, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getSelectedText, getState, getTriggerWidget, getTriggerWidget, getVisiblePart, getZOrderClass, hasFocus, hasFocus, hidden, hide, highlighted, ignoreEnable, initialHeight, initialWidth, isCurrent, isDirectManipulable, isDirectManipulationActive, isDisplayed, isDroppable, isEnabled, isFocusable, isHeader, isInitialValueLayout, isLegacyFocus, isRealized, isRepaintDisabled, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, maySwitchFocus, moveToBottom, moveToTop, name, navigable, oleDrag, parent, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, refreshWidget, registerWidgetStateListener, repaint, repaint, requestFocus, requestSync, resizeTo, resolvePopupMenuId, screen, screenLocation, screenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, show, supportsCustomMousePointer, systemFocusGrabbed, topLevelWindow, unregisterWidgetStateListener, validateDisplayValue, window
private ButtonListGroupItemConfig config
private ImageGuiImpl image
private TextCell textWidget
private ButtonListGuiImpl.Items container
public Item(ButtonListGroupItemConfig config, ButtonListGuiImpl.Items container)
config
- The given item's configurationcontainer
- The item's containerpublic ButtonListGroupItemConfig config()
config
in interface Widget<GuiOutputManager>
config
in class AbstractWidget<GuiOutputManager>
public Dimension dimension()
dimension
in interface Widget<GuiOutputManager>
dimension
in class AbstractContainer<GuiOutputManager>
public double width()
width
in interface Widget<GuiOutputManager>
width
in class AbstractContainer<GuiOutputManager>
public double height()
height
in interface Widget<GuiOutputManager>
height
in class AbstractContainer<GuiOutputManager>
public void setSize(double width, double height)
setSize
in interface Container<GuiOutputManager>
setSize
in class AbstractContainer<GuiOutputManager>
width
- The item widthheight
- The item heightpublic void updateSize(double rowWidth, double rowHeight)
rowWidth
- The row widthrowHeight
- The row heightpublic void setSelected(boolean isSelected)
public void createOrUpdateComponents()
public void updateFont(int font)
font
- The new fontprotected int[] mouseActions()
mouseActions
in class AbstractWidget<GuiOutputManager>
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
mouseEntered
in class AbstractWidget<GuiOutputManager>
e
- The mouse eventpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
mouseExited
in class AbstractWidget<GuiOutputManager>
e
- The mouse eventpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
mouseDragged
in class AbstractWidget<GuiOutputManager>
e
- The mouse event.public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
mouseClicked
in class AbstractWidget<GuiOutputManager>
e
- The mouse event.public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
mousePressed
in class AbstractWidget<GuiOutputManager>
e
- The mouse event.public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
mouseReleased
in class AbstractWidget<GuiOutputManager>
e
- The mouse event.public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
mouseMoved
in class AbstractWidget<GuiOutputManager>
e
- The mouse event.public Widget<GuiOutputManager> findMouseSource(NativePoint p)
findMouseSource
in interface Widget<GuiOutputManager>
findMouseSource
in class AbstractContainer<GuiOutputManager>
p
- The mouse coordinates relative to its parent container