org.kalmeo.kuix.widget
Class Screen

java.lang.Object
  extended by org.kalmeo.kuix.widget.Widget
      extended by org.kalmeo.kuix.widget.Screen

public class Screen
extends Widget

This class represents a Kuix screen.

For further informations, visit the Kuix widgets reference page.

Author:
bbeaulant

Nested Class Summary
 class Screen.ScreenBar
          This class represents a screen top or bottom bar (used for title and/or menu)
 class Screen.ScreenMenu
          This class represents a screen menu
 
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.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
Screen()
          Construct a {Screen}
Screen(java.lang.String tag)
          Construct a {Screen}
 
Method Summary
 Widget add(Widget widget)
          Add a Widget to this as child
static void customizeScreenMenuLabels(java.io.ByteArrayInputStream selectLabelRenderer, java.io.ByteArrayInputStream cancelLabelRenderer)
          Cutomize Kuix screen menu labels.
protected  void doLayout()
          Layout the widget if its layout is defined.
 Alignment getAlign()
          Returns the alignment value.
 Insets getBorder()
           
 Screen.ScreenBar getBottomBar()
          Create the internal 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.
protected  Screen.ScreenMenu getFirstInternalMenu()
          Create the internal firstMenu instance if it doesn't exist and return it.
 Menu getFirstMenu()
          Create the firstMenu 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()
           
 Insets getMargin()
           
 Insets getPadding()
           
 Menu getScreenMenu(int kuixKeyCode)
          Returns the Screen.ScreenMenu that correspond to the given kuixKeyCode.
protected  Screen.ScreenMenu getSecondInternalMenu()
          Create the internal secondMenu instance if it doesn't exist and return it.
 Menu getSecondMenu()
          Create the secondMenu instance if it doesn't exist and return it.
 java.lang.String getTitleText()
           
 Screen.ScreenBar getTopBar()
          Create the internal topBar instance if it doesn't exist and return it.
 Transition getTransition()
           
 boolean isBarsOnTop()
           
 boolean isCleanUpWhenRemoved()
           
protected  void onRemoved(Widget parent)
          Event called when the widjet is removed from parent.
protected  boolean processMenuAction(Menu menu, boolean internal, boolean isFirst)
          Process an internal or default menu action.
 boolean processPointerEvent(byte type, int x, int y)
          Process a pointer event
 void removeAll()
          Remove all childs.
 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 setCurrent()
          Set this Screen has current.
 void setTitle(java.lang.String title)
          Define the desktop title
protected  void switchToDefaultMenus()
          Switch menu display from internal menus to default menus
protected  void switchToInternalMenus()
          Switch menu display from defaults menus to internal menus
 
Methods inherited from class org.kalmeo.kuix.widget.Widget
add, bringNear, bringToFront, catchChildrenFrom, cleanUp, cleanUpChildren, clearCachedStyle, getAttribute, getAuthorStyle, getAvailablePseudoClasses, getBackgroundAlign, getBackgroundColor, getBackgroundImage, getBackgroundRepeat, getBorderAlign, getBorderColor, getBorderImage, getBorderStroke, getCachedMetrics, getChild, getColor, getDataProvider, getDesktop, getDisplayX, getDisplayY, getGrayedColor, getHeight, getId, getInheritedTag, getInnerHeight, getInnerWidth, getInsets, getLastChild, getLayoutData, getMinSize, getOtherFocus, getPreferredSize, getSpan, getStyleClasses, getStylePropertyValue, getStyles, getTag, getWeight, getWidget, getWidgetAt, getWidgetAt, getWidth, getX, getY, hasBindInstruction, hasShortcutKeyCodes, hasShortcuts, invalidate, invalidate, invalidateAppearance, invalidateAppearanceRegion, invalidateStylePropertiesCache, isFocusable, isFocused, isFocusWidgetChild, isIndividualyVisible, isInvalidated, isInWidgetTree, isObjectAttribute, isPseudoClassCompatible, isShortcutKeyCodeCompatible, isVisible, markAsValidate, needToComputePreferredSize, onAdded, onChildAdded, onChildRemoved, onFocus, onLostFocus, paint, paintBackground, paintBorder, paintChildrenImpl, paintImpl, paintMosaicImage, parseAuthorStyle, processActionEvent, processDataBindEvent, processFocusEvent, processItemsModelUpdateEvent, processKeyEvent, processModelUpdateEvent, processShortcutKeyEvent, propagateFocusEvent, remove, removeAttributeBindInstruction, requestBackwardFocus, requestFocus, requestForwardFocus, sendToBack, setAttributeBindInstruction, setAuthorStyle, setBounds, setDataProvider, setId, setObjectAttribute, setShortcutKeyCodes, setShortcuts, setStyleClass, setStyleClasses, setVisible
 
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

Screen

public Screen()
Construct a {Screen}


Screen

public Screen(java.lang.String tag)
Construct a {Screen}

Parameters:
tag -
Method Detail

customizeScreenMenuLabels

public static void customizeScreenMenuLabels(java.io.ByteArrayInputStream selectLabelRenderer,
                                             java.io.ByteArrayInputStream cancelLabelRenderer)
Cutomize Kuix screen menu labels.

Parameters:
selectLabelRenderer - the renderer (xml input stream) used as select label
cancelLabelRenderer - the renderer (xml input scream) used as cancel label

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 Widget
Returns:
true if the attribute exists

getTitleText

public java.lang.String getTitleText()
Returns:
the title

setTitle

public void setTitle(java.lang.String title)
Define the desktop title

Parameters:
title -

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

getFocusManager

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

Overrides:
getFocusManager in class Widget
Returns:
The special FocusManager

getLayout

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

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

getTransition

public Transition getTransition()
Returns:
the transition

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

getTopBar

public Screen.ScreenBar getTopBar()
Create the internal topBar instance if it doesn't exist and return it.

Returns:
the internal topBar instance

getBottomBar

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

Returns:
the internal bottomBar instance

getScreenMenu

public Menu getScreenMenu(int kuixKeyCode)
Returns the Screen.ScreenMenu that correspond to the given kuixKeyCode.

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

getFirstMenu

public Menu getFirstMenu()
Create the firstMenu instance if it doesn't exist and return it.

Returns:
the internal firstMenu instance

getSecondMenu

public Menu getSecondMenu()
Create the secondMenu instance if it doesn't exist and return it.

Returns:
the internal secondMenu instance

getFirstInternalMenu

protected Screen.ScreenMenu getFirstInternalMenu()
Create the internal firstMenu instance if it doesn't exist and return it.

Returns:
the internal firstMenu instance

getSecondInternalMenu

protected Screen.ScreenMenu getSecondInternalMenu()
Create the internal secondMenu instance if it doesn't exist and return it.

Returns:
the internal secondMenu instance

switchToInternalMenus

protected void switchToInternalMenus()
Switch menu display from defaults menus to internal menus


switchToDefaultMenus

protected void switchToDefaultMenus()
Switch menu display from internal menus to default menus


setCurrent

public void setCurrent()
Set this Screen has current.


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

removeAll

public void removeAll()
Description copied from class: Widget
Remove all childs.
Caution : this method do NOT cleanUp child widgets. It only remove widgets from widget tree.

Overrides:
removeAll in class Widget

processPointerEvent

public boolean processPointerEvent(byte type,
                                   int x,
                                   int y)
Description copied from class: Widget
Process a pointer event

Overrides:
processPointerEvent in class Widget
Returns:
true if the event is treated by the widget

processMenuAction

protected boolean processMenuAction(Menu menu,
                                    boolean internal,
                                    boolean isFirst)
Process an internal or default menu action.

Parameters:
menu -
internal -
isFirst -
Returns:
true if the event is treated by the widget

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.