com.leafdigital.ui.api
Interface Widget

All Known Subinterfaces:
BorderPanel, Button, ButtonPanel, CheckBox, ChoicePanel, DecoratedPanel, Dropdown, EditArea, EditBox, GroupPanel, HorizontalPanel, Label, ListBox, Page, Panel, Pic, Progress, RadioButton, ScrollPanel, Spacer, SplitPanel, Table, TabPanel, TextView, TreeBox, VerticalPanel

public interface Widget

Interface implemented by all objects that you can add to the user interface.

Do not implement this interface to create new widgets. Instead, use UI.newJComponentWrapper. (Widgets must also implement the InternalWidget interface, which is not public and is subject to change.)


Method Summary
 java.lang.String getID()
           
 WidgetOwner getOwner()
           
 void informClosed()
          Called to inform the widget when the window that holds it has been closed.
 boolean isVisible()
           
 void setOwner(WidgetOwner owner)
          Sets the widget owner.
 void setVisible(boolean visible)
          Sets the visibility state of the widget.
 

Method Detail

getID

java.lang.String getID()
Returns:
Widget's ID or null if none

getOwner

WidgetOwner getOwner()
Returns:
Widget's owner

setOwner

void setOwner(WidgetOwner owner)
Sets the widget owner. You might need to call this if creating widgets yourself, if you want to set up a callback or similar before adding it to anything.

Parameters:
owner - Owner

setVisible

void setVisible(boolean visible)
Sets the visibility state of the widget. While invisible, the widget does not occupy space. Widgets default to visible.

Parameters:
visible - Visibility state

isVisible

boolean isVisible()
Returns:
True if the widget is currently visible.

informClosed

void informClosed()
Called to inform the widget when the window that holds it has been closed.



Copyright © 2011 Samuel Marshall. All rights reserved.