org.springframework.richclient.widget
Interface Widget

Show UML class diagram
All Known Subinterfaces:
SelectionWidget, TableWidget<T>, TitledWidget
All Known Implementing Classes:
AbstractDataEditorWidget, AbstractFocussableForm, AbstractTitledWidget, AbstractTitledWidgetForm, AbstractWidget, AbstractWidgetForm, ButtonSwitcherWidget, ContactForm, DefaultDataEditorWidget, GlazedListTableWidget, HTMLViewWidget, ImageViewWidget, ItemDataEditor, ItemForm, ScreenSimulationWidget, SupplierDataEditor, SupplierForm, TabbedForm, TitledWidgetForm, TodoForm

public interface Widget

Widget specifies the interface for Swing component factories General usage of implementations:

  1. Instantiate the widget
  2. Set specific parameters for the widget or use overloaded constructors to combine this step and the previous one
  3. Get the component using getComponent()


Field Summary
static Widget EMPTY_WIDGET
           
 
Method Summary
 boolean canClose()
          Checks whether this component can be closed visually, for example when there are no unsaved changes.
 List<? extends AbstractCommand> getCommands()
          Returns a list of commands for this widget.
 JComponent getComponent()
           
 boolean isShowing()
          Encompasses the status of the widget between onAboutToShow() and onAboutToHide().
 void onAboutToHide()
          Hook method called before moving the component to the background (=hiding)
 void onAboutToShow()
          Hook method called before showing the component on screen.
 

Field Detail

EMPTY_WIDGET

static final Widget EMPTY_WIDGET
Method Detail

getComponent

JComponent getComponent()
Returns:
A not null graphical component built using the parameters held in the widget instance.

onAboutToShow

void onAboutToShow()
Hook method called before showing the component on screen.


onAboutToHide

void onAboutToHide()
Hook method called before moving the component to the background (=hiding)


isShowing

boolean isShowing()
Encompasses the status of the widget between onAboutToShow() and onAboutToHide(). A component does not know when it's active, even if there is an isShowing() method in it's API (due to tab panels or scroll panes).

Returns:
true if the widget is shown in the foreground.

canClose

boolean canClose()
Checks whether this component can be closed visually, for example when there are no unsaved changes.

Returns:
true if the widget can be closed without problems.

getCommands

List<? extends AbstractCommand> getCommands()
Returns a list of commands for this widget.



Copyright © 2004-2009 The Spring Framework. All Rights Reserved.