com.sun.lwuit
Class ComponentGroup
java.lang.Object
com.sun.lwuit.Component
com.sun.lwuit.Container
com.sun.lwuit.ComponentGroup
- All Implemented Interfaces:
- Animation, StyleListener
public class ComponentGroup
- extends Container
A component group is a container that applies the given UIID to a set of components within it
and gives the same UIID with "First"/"Last" prepended to the first and last components. E.g.
by default the GroupElement UIID is applied so the first and last elements would have the
GroupElementFirst/GroupElementLast UIID's applied to them. If a group has only one element
the word "Only" is appended to the element UIID as in GroupElementOnly.
Important!!! A component group does nothing by default unless explicitly activated by
the theme by enabling the ComponentGroupBool constant (by default, this can be customized via the groupFlag property).
This allows logical grouping without changing the UI for themes that don't need grouping.
This container uses box X/Y layout (defaults to Y), other layout managers shouldn't be used
since this container relies on the specific behavior of the box layout.
Method Summary |
java.lang.String |
getElementUIID()
The UIID to apply to the elements within this container |
java.lang.String |
getGroupFlag()
The group flag allows changing the flag that activates this group, from ComponentGroupBool to any
arbitrary flag. |
java.lang.String[] |
getPropertyNames()
A component may expose mutable property names for a UI designer to manipulate, this
API is designed for usage internally by the GUI builder code |
java.lang.Class[] |
getPropertyTypes()
Matches the property names method (see that method for further details). |
java.lang.Object |
getPropertyValue(java.lang.String name)
Returns the current value of the property name, this method is used by the GUI builder |
boolean |
isHorizontal()
Indicates that the component group should be horizontal by using the BoxLayout Y |
void |
refreshTheme()
Makes sure the component is up to date with the current style object |
void |
setElementUIID(java.lang.String elementUIID)
The UIID to apply to the elements within this container |
void |
setGroupFlag(java.lang.String groupFlag)
The group flag allows changing the flag that activates this group, from ComponentGroupBool to any
arbitrary flag. |
void |
setHorizontal(boolean horizontal)
Indicates that the component group should be horizontal by using the BoxLayout Y |
java.lang.String |
setPropertyValue(java.lang.String name,
java.lang.Object value)
Sets a new value to the given property, returns an error message if failed
and null if successful. |
Methods inherited from class com.sun.lwuit.Container |
addComponent, addComponent, addComponent, addComponent, animateLayout, animateLayoutAndWait, applyRTL, calcPreferredSize, contains, dragInitiated, drop, findFirstFocusable, flushReplace, getBottomGap, getComponentAt, getComponentAt, getComponentCount, getComponentIndex, getGridPosX, getGridPosY, getLayout, getLayoutHeight, getLayoutWidth, getLeadComponent, getLeadParent, getScrollIncrement, getSideGap, invalidate, isEnabled, isScrollableX, isScrollableY, keyPressed, keyReleased, layoutContainer, paint, paintBackground, paintGlass, paramString, pointerHover, pointerPressed, removeAll, removeComponent, replace, replace, replaceAndWait, replaceAndWait, replaceAndWait, revalidate, scrollComponentToVisible, setCellRenderer, setEnabled, setLayout, setLeadComponent, setScrollable, setScrollableX, setScrollableY, setScrollIncrement, setShouldCalcPreferredSize, setShouldLayout |
Methods inherited from class com.sun.lwuit.Component |
addFocusListener, animate, calcScrollSize, contains, deinitialize, deinitializeCustomStyle, dragEnter, dragExit, draggingOver, drawDraggedImage, fireClicked, focusGained, focusLost, getAbsoluteX, getAbsoluteY, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentForm, getDirtyRegion, getDisabledStyle, getDragImage, getHeight, getLabelForComponent, getName, getNextFocusDown, getNextFocusLeft, getNextFocusRight, getNextFocusUp, getParent, getPreferredH, getPreferredSize, getPreferredW, getPressedStyle, getScrollAnimationSpeed, getScrollDimension, getScrollOpacity, getScrollOpacityChangeSpeed, getScrollX, getScrollY, getSelectCommandText, getSelectedRect, getSelectedStyle, getStyle, getTensileLength, getUIID, getUnselectedStyle, getWidth, getVisibleBounds, getX, getY, growShrink, handlesInput, hasFocus, initComponent, initCustomStyle, installDefaultPainter, isAlwaysTensile, isDragActivated, isDragAndDropOperation, isDraggable, isDropTarget, isFlatten, isFocusable, isGrabsPointerEvents, isHideInPortrait, isInitialized, isRTL, isScrollable, isScrollVisible, isSelectableInteraction, isSmoothScrolling, isSnapToGrid, isTactileTouch, isTactileTouch, isTensileDragEnabled, isVisible, keyRepeated, laidOut, longKeyPress, longPointerPress, paintBackgrounds, paintBorder, paintComponent, paintComponent, paintLock, paintLockRelease, paintScrollbars, paintScrollbarX, paintScrollbarY, pointerDragged, pointerDragged, pointerHoverPressed, pointerHoverReleased, pointerPressed, pointerReleased, pointerReleased, putClientProperty, refreshTheme, removeFocusListener, repaint, repaint, requestFocus, scrollRectToVisible, scrollRectToVisible, setAlwaysTensile, setDirtyRegion, setDisabledStyle, setDraggable, setDropTarget, setFlatten, setFocus, setFocusable, setGrabsPointerEvents, setHandlesInput, setHeight, setHideInPortrait, setInitialized, setIsScrollVisible, setLabelForComponent, setName, setNextFocusDown, setNextFocusLeft, setNextFocusRight, setNextFocusUp, setPreferredH, setPreferredSize, setPreferredW, setPressedStyle, setRTL, setScrollAnimationSpeed, setScrollOpacityChangeSpeed, setScrollSize, setScrollVisible, setScrollX, setScrollY, setSelectCommandText, setSelectedStyle, setSize, setSmoothScrolling, setSnapToGrid, setTactileTouch, setTensileDragEnabled, setTensileLength, setUIID, setUnselectedStyle, setWidth, setVisible, setX, setY, styleChanged, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ComponentGroup
public ComponentGroup()
- Default constructor
refreshTheme
public void refreshTheme()
- Description copied from class:
Component
- Makes sure the component is up to date with the current style object
- Overrides:
refreshTheme
in class Container
isHorizontal
public boolean isHorizontal()
- Indicates that the component group should be horizontal by using the BoxLayout Y
- Returns:
- the horizontal
setHorizontal
public void setHorizontal(boolean horizontal)
- Indicates that the component group should be horizontal by using the BoxLayout Y
- Parameters:
horizontal
- the horizontal to set
getElementUIID
public java.lang.String getElementUIID()
- The UIID to apply to the elements within this container
- Returns:
- the elementUIID
setElementUIID
public void setElementUIID(java.lang.String elementUIID)
- The UIID to apply to the elements within this container
- Parameters:
elementUIID
- the elementUIID to set
getPropertyNames
public java.lang.String[] getPropertyNames()
- Description copied from class:
Component
- A component may expose mutable property names for a UI designer to manipulate, this
API is designed for usage internally by the GUI builder code
- Overrides:
getPropertyNames
in class Component
- Returns:
- the property names allowing mutation
getPropertyTypes
public java.lang.Class[] getPropertyTypes()
- Description copied from class:
Component
- Matches the property names method (see that method for further details).
- Overrides:
getPropertyTypes
in class Component
- Returns:
- the types of the properties
getPropertyValue
public java.lang.Object getPropertyValue(java.lang.String name)
- Description copied from class:
Component
- Returns the current value of the property name, this method is used by the GUI builder
- Overrides:
getPropertyValue
in class Component
- Parameters:
name
- the name of the property
- Returns:
- the value of said property
setPropertyValue
public java.lang.String setPropertyValue(java.lang.String name,
java.lang.Object value)
- Description copied from class:
Component
- Sets a new value to the given property, returns an error message if failed
and null if successful. Notice that some builtin properties such as "$designMode" might be sent
to components to indicate application state.
- Overrides:
setPropertyValue
in class Component
- Parameters:
name
- the name of the propertyvalue
- new value for the property
- Returns:
- error message or null
getGroupFlag
public java.lang.String getGroupFlag()
- The group flag allows changing the flag that activates this group, from ComponentGroupBool to any
arbitrary flag. This allows a developer/designer to enable grouping for a specific type of components
(e.g. for horizontal Toggle Buttons) yet disable it for vertical lists of components.
- Returns:
- the groupFlag
setGroupFlag
public void setGroupFlag(java.lang.String groupFlag)
- The group flag allows changing the flag that activates this group, from ComponentGroupBool to any
arbitrary flag. This allows a developer/designer to enable grouping for a specific type of components
(e.g. for horizontal Toggle Buttons) yet disable it for vertical lists of components.
- Parameters:
groupFlag
- the groupFlag to set