|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kalmeo.kuix.widget.Widget
org.kalmeo.kuix.widget.Desktop
public class Desktop
This class represents the Kuix desktop.
For further informations, visit the Kuix widgets reference page.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.kalmeo.kuix.widget.Widget |
---|
Widget.BindInstruction |
Field Summary |
---|
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 | |
---|---|
Desktop()
Construct a Desktop |
Method Summary | |
---|---|
Widget |
add(Widget widget)
Add a Widget to this as child |
void |
addPopup(Widget widget)
Add a popup widget |
protected void |
doLayout()
Layout the widget if its layout is defined. |
Insets |
getBorder()
|
FocusManager |
getCurrentFocusManager()
|
Screen |
getCurrentScreen()
|
Desktop |
getDesktop()
|
Widget |
getDraggedWidget()
|
FocusManager |
getFocusManager()
Used for popup like widgets |
Layout |
getLayout()
|
LayoutData |
getLayoutData()
|
Insets |
getMargin()
|
Insets |
getPadding()
|
Widget |
getWidget(java.lang.String id)
Returns the Widget witch correspond to the id , or
null |
void |
invalidate(Widget fromWidget)
Invalidate the widget's size and position and propagate the information to its parent. |
protected void |
invalidateAppearanceRegion(int x,
int y,
int width,
int height)
Invalidate a specific region. |
boolean |
isInWidgetTree()
|
protected void |
onChildAdded(Widget widget)
Event called when the child widjet is added. |
protected void |
onChildRemoved(Widget widget)
Event called when the child widjet is removed. |
void |
paint(Graphics g)
Paint the widget itself. |
void |
paintImpl(Graphics g)
Paint the implementation of the widget (itself and its children). |
void |
pushPopupFocusManager(FocusManager focusManager)
|
void |
removeAll()
Remove all childs. |
void |
removeAllPopupFromTag(java.lang.String tag)
Remove all popup widgets where tag equals tag . |
Widget |
removeDraggedWidget(boolean restore)
Remove the dragged widget and returns its instance. |
void |
removePopupFocusManager(FocusManager focusManager)
Remove the specified popup focusManager |
void |
revalidate()
Revalidate the Desktop |
void |
setBounds(int x,
int y,
int width,
int height)
Set the widget's bounds |
void |
setCurrentScreen(Screen screen)
|
void |
setDraggedWidget(Widget widget,
int x,
int y)
Define the dragged widget. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Desktop()
Desktop
Method Detail |
---|
public void setBounds(int x, int y, int width, int height)
Widget
setBounds
in class Widget
public boolean isInWidgetTree()
isInWidgetTree
in class Widget
true
if the widget is in widget tree of desktoppublic Desktop getDesktop()
getDesktop
in class Widget
Desktop
public Screen getCurrentScreen()
public void setCurrentScreen(Screen screen)
screen
- the screen to setpublic Widget getWidget(java.lang.String id)
Widget
Widget
witch correspond to the id
, or
null
getWidget
in class Widget
Widget
witch correspond to the id
public FocusManager getFocusManager()
Widget
getFocusManager
in class Widget
public FocusManager getCurrentFocusManager()
public void pushPopupFocusManager(FocusManager focusManager)
focusManager
- the popup focusManager to setpublic void removePopupFocusManager(FocusManager focusManager)
focusManager
- public Layout getLayout()
getLayout
in class Widget
public LayoutData getLayoutData()
getLayoutData
in class Widget
public Insets getMargin()
getMargin
in class Widget
public Insets getBorder()
getBorder
in class Widget
public Insets getPadding()
getPadding
in class Widget
public void setDraggedWidget(Widget widget, int x, int y)
widget
- public Widget getDraggedWidget()
public Widget removeDraggedWidget(boolean restore)
restore
is true
the dragged widget is
restor to its original parent.
restore
- restore the dragged widget to its original parent
public void addPopup(Widget widget)
widget
- defaultFocusManager
- public void removeAllPopupFromTag(java.lang.String tag)
tag
.
tag
- public Widget add(Widget widget)
Widget
Widget
to this as child
add
in class Widget
widget
- The Widget
to add
Widget
public void removeAll()
Widget
removeAll
in class Widget
public void invalidate(Widget fromWidget)
Widget
doLayout()
and paint() method on all
invalidated widgets.
invalidate
in class Widget
fromWidget
- the Widget responsible of the invalidation.public void revalidate()
protected void doLayout()
Widget
doLayout
in class Widget
protected void invalidateAppearanceRegion(int x, int y, int width, int height)
Widget
invalidateAppearanceRegion
in class Widget
public void paintImpl(Graphics g)
Widget
paintImpl
in class Widget
public void paint(Graphics g)
Widget
paint
in class Widget
protected void onChildAdded(Widget widget)
Widget
widjet
is added.
onChildAdded
in class Widget
widget
- The widget child witch is addedprotected void onChildRemoved(Widget widget)
Widget
widjet
is removed.
onChildRemoved
in class Widget
widget
- The widget child witch is removed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |