org.kalmeo.kuix.widget
Class PopupBox

java.lang.Object
  extended by org.kalmeo.kuix.widget.Widget
      extended by org.kalmeo.kuix.widget.FocusableWidget
          extended by org.kalmeo.kuix.widget.ActionWidget
              extended by org.kalmeo.kuix.widget.PopupBox

public class PopupBox
extends ActionWidget

This class represents a Kuix popup box.

For further informations, visit the Kuix widgets reference page.

Author:
bbeaulant

Nested Class Summary
 class PopupBox.PopupBoxMenuItem
          This class represents a popupBox menuItem
 
Nested classes/interfaces inherited from class org.kalmeo.kuix.widget.Widget
Widget.BindInstruction
 
Field Summary
 boolean barsOnTop
           
 boolean cleanUpWhenRemoved
           
 
Fields inherited from class org.kalmeo.kuix.widget.FocusableWidget
DISABLED_PSEUDO_CLASS, enabled, focusable, focused, HOVER_PSEUDO_CLASS, PSEUDO_CLASSES
 
Fields inherited from class org.kalmeo.kuix.widget.Widget
bindInstructions, DEFAULT_ALIGN, DEFAULT_BACKGROUND_ALIGN, DEFAULT_BACKGROUND_REPEAT, DEFAULT_BORDER, DEFAULT_GAP, DEFAULT_MARGIN, DEFAULT_MIN_SIZE, DEFAULT_PADDING, DEFAULT_SPAN, DEFAULT_WEIGHT, next, parent, previous
 
Constructor Summary
PopupBox()
          Construct a PopupBox
 
Method Summary
 Widget add(Widget widget)
          Add a Widget to this as child
protected  void doLayout()
          Layout the widget if its layout is defined.
 Alignment getAlign()
          Returns the alignment value.
 Color getBackgroundColor()
          Returns the background color value.
 Image[] getBackgroundImage()
          Returns the backroundImage or image list if multi images are defined.
 Insets getBorder()
           
 Widget getBottomBar()
          Create the bottomBar instance if it doesn't exist and return it.
protected  java.lang.Object getDefaultStylePropertyValue(java.lang.String name)
          Returns the de default style property value for name property, or null.
 MenuItem getFirstMenuItem()
          Create the firstMenuItem instance if it doesn't exist and return it.
 FocusManager getFocusManager()
          Used for popup like widgets
 Gap getGap()
          Returns the gap value.
 Widget getInternalChildInstance(java.lang.String tag)
          Returns the first internal child instance corresponding to the given tag.
 Layout getLayout()
           
 LayoutData getLayoutData()
           
 Insets getMargin()
           
 Insets getPadding()
           
 MenuItem getPopupBoxMenuItem(int kuixKeyCode)
          Returns the Screen.ScreenMenu that correspond to the given kuixKeyCode.
 MenuItem getSecondMenuItem()
          Create the secondMenuItem instance if it doesn't exist and return it.
 boolean isBarsOnTop()
           
 boolean isCleanUpWhenRemoved()
           
 boolean isFocusable()
          Check if this Widget is focusable.
protected  void onAdded(Widget parent)
          Event called when the widjet is added to parent.
protected  void onRemoved(Widget parent)
          Event called when the widjet is removed from parent.
 boolean setAttribute(java.lang.String name, java.lang.String value)
          Set the value to the specified attribute representing by the name
 void setBarsOnTop(boolean barsOnTop)
           
 void setCleanUpWhenRemoved(boolean cleanUpWhenRemoved)
           
 void setContent(java.lang.Object content)
          Define the content of the PopupBox.
 void setDuration(int duration)
           
 
Methods inherited from class org.kalmeo.kuix.widget.ActionWidget
getOnAction, processActionEvent, processKeyEvent, processPointerEvent, processShortcutKeyEvent, setOnAction
 
Methods inherited from class org.kalmeo.kuix.widget.FocusableWidget
getAttribute, getAvailablePseudoClasses, getOnFocus, getOnLostFocus, giveFocusToNearestWidget, isEnabled, isFocused, isPseudoClassCompatible, processFocusEvent, remove, requestFocus, setEnabled, setFocusable, setOnFocus, setOnLostFocus, setVisible
 
Methods inherited from class org.kalmeo.kuix.widget.Widget
add, bringNear, bringToFront, catchChildrenFrom, cleanUp, cleanUpChildren, clearCachedStyle, getAuthorStyle, getBackgroundAlign, getBackgroundRepeat, getBorderAlign, getBorderColor, getBorderImage, getBorderStroke, getCachedMetrics, getChild, getColor, getDataProvider, getDesktop, getDisplayX, getDisplayY, getGrayedColor, getHeight, getId, getInheritedTag, getInnerHeight, getInnerWidth, getInsets, getLastChild, getMinSize, getOtherFocus, getPreferredSize, getSpan, getStyleClasses, getStylePropertyValue, getStyles, getTag, getWeight, getWidget, getWidgetAt, getWidgetAt, getWidth, getX, getY, hasBindInstruction, hasShortcutKeyCodes, hasShortcuts, invalidate, invalidate, invalidateAppearance, invalidateAppearanceRegion, invalidateStylePropertiesCache, isFocusWidgetChild, isIndividualyVisible, isInvalidated, isInWidgetTree, isObjectAttribute, isShortcutKeyCodeCompatible, isVisible, markAsValidate, needToComputePreferredSize, onChildAdded, onChildRemoved, onFocus, onLostFocus, paint, paintBackground, paintBorder, paintChildrenImpl, paintImpl, paintMosaicImage, parseAuthorStyle, processDataBindEvent, processItemsModelUpdateEvent, processModelUpdateEvent, propagateFocusEvent, removeAll, removeAttributeBindInstruction, requestBackwardFocus, requestForwardFocus, sendToBack, setAttributeBindInstruction, setAuthorStyle, setBounds, setDataProvider, setId, setObjectAttribute, setShortcutKeyCodes, setShortcuts, setStyleClass, setStyleClasses
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cleanUpWhenRemoved

public boolean cleanUpWhenRemoved

barsOnTop

public boolean barsOnTop
Constructor Detail

PopupBox

public PopupBox()
Construct a PopupBox

Method Detail

getInternalChildInstance

public Widget getInternalChildInstance(java.lang.String tag)
Description copied from class: Widget
Returns the first internal child instance corresponding to the given tag.

Overrides:
getInternalChildInstance in class Widget
Returns:
the child instance if it exists.

setAttribute

public boolean setAttribute(java.lang.String name,
                            java.lang.String value)
Description copied from class: Widget
Set the value to the specified attribute representing by the name

Overrides:
setAttribute in class ActionWidget
Returns:
true if the attribute exists

isCleanUpWhenRemoved

public boolean isCleanUpWhenRemoved()
Returns:
the cleanUpWhenRemoved

setCleanUpWhenRemoved

public void setCleanUpWhenRemoved(boolean cleanUpWhenRemoved)
Parameters:
cleanUpWhenRemoved - the cleanUpWhenRemoved to set

isBarsOnTop

public boolean isBarsOnTop()
Returns:
the barsOnTop

setBarsOnTop

public void setBarsOnTop(boolean barsOnTop)
Parameters:
barsOnTop - the barsOnTop to set

getBottomBar

public Widget getBottomBar()
Create the bottomBar instance if it doesn't exist and return it.

Returns:
the bottomBar instance

getFocusManager

public FocusManager getFocusManager()
Description copied from class: Widget
Used for popup like widgets

Overrides:
getFocusManager in class Widget
Returns:
The special FocusManager

isFocusable

public boolean isFocusable()
Description copied from class: Widget
Check if this Widget is focusable.

Overrides:
isFocusable in class FocusableWidget
Returns:
true if the widget is focusable

getDefaultStylePropertyValue

protected java.lang.Object getDefaultStylePropertyValue(java.lang.String name)
Description copied from class: Widget
Returns the de default style property value for name property, or null.

Overrides:
getDefaultStylePropertyValue in class Widget
Returns:
The de default style property value for name property

getMargin

public Insets getMargin()
Overrides:
getMargin in class Widget
Returns:
the margin

getBorder

public Insets getBorder()
Overrides:
getBorder in class Widget
Returns:
the border

getPadding

public Insets getPadding()
Overrides:
getPadding in class Widget
Returns:
the padding

getAlign

public Alignment getAlign()
Description copied from class: Widget
Returns the alignment value.

Overrides:
getAlign in class Widget
Returns:
the alignment

getGap

public Gap getGap()
Description copied from class: Widget
Returns the gap value. The gape represents the horizontal and vertical space between widget's children.

Overrides:
getGap in class Widget
Returns:
the gap

getLayout

public Layout getLayout()
Overrides:
getLayout in class Widget
Returns:
the layout

getLayoutData

public LayoutData getLayoutData()
Overrides:
getLayoutData in class Widget
Returns:
the layoutData

getBackgroundColor

public Color getBackgroundColor()
Description copied from class: Widget
Returns the background color value. By default the value is null.

Overrides:
getBackgroundColor in class Widget
Returns:
the backgroundColor

getBackgroundImage

public Image[] getBackgroundImage()
Description copied from class: Widget
Returns the backroundImage or image list if multi images are defined.

Overrides:
getBackgroundImage in class Widget
Returns:
the backroundImage array

setDuration

public void setDuration(int duration)
Parameters:
duration - the duration to set

setContent

public void setContent(java.lang.Object content)
Define the content of the PopupBox. The content object could be s straing or a Widget.

Parameters:
content - the string or widget to add as content

doLayout

protected void doLayout()
Description copied from class: Widget
Layout the widget if its layout is defined.

Overrides:
doLayout in class Widget

add

public Widget add(Widget widget)
Description copied from class: Widget
Add a Widget to this as child

Overrides:
add in class Widget
Parameters:
widget - The Widget to add
Returns:
This Widget

getPopupBoxMenuItem

public MenuItem getPopupBoxMenuItem(int kuixKeyCode)
Returns the Screen.ScreenMenu that correspond to the given kuixKeyCode.

Parameters:
kuixKeyCode -
Returns:
the Screen.ScreenMenu that correspond to the given kuixKeyCode

getFirstMenuItem

public MenuItem getFirstMenuItem()
Create the firstMenuItem instance if it doesn't exist and return it.

Returns:
the firstMenuItem instance

getSecondMenuItem

public MenuItem getSecondMenuItem()
Create the secondMenuItem instance if it doesn't exist and return it.

Returns:
the secondMenuItem instance

onAdded

protected void onAdded(Widget parent)
Description copied from class: Widget
Event called when the widjet is added to parent.

Overrides:
onAdded in class FocusableWidget

onRemoved

protected void onRemoved(Widget parent)
Description copied from class: Widget
Event called when the widjet is removed from parent.

Overrides:
onRemoved in class Widget


Copyright © 2007-2008 Kalmeo. All Rights Reserved.