org.malai.ui
Class UIComposer<T extends java.awt.Component>

java.lang.Object
  extended by org.malai.ui.UIComposer<T>
Type Parameters:
T - The type of widget produced by the composer.
Direct Known Subclasses:
MenubarBuilder, PropertiesToolbarBuilder, ToolbarBuilder, UIBuilder

public abstract class UIComposer<T extends java.awt.Component>
extends java.lang.Object

A UI composer is a object that composes a user interface using instruments and presentations.

This file is part of Malai.
Copyright (c) 2009-2012 Arnaud BLOUIN

Malai is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Malai is distributed without any warranty; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

10/31/2010

Since:
0.2
Version:
0.2
Author:
Arnaud BLOUIN

Field Summary
protected  T widget
          The widget composed by the composer.
 
Constructor Summary
UIComposer()
          Creates the composer.
 
Method Summary
abstract  void compose(MProgressBar progressBar)
          This method composes the user interface using instruments, presentations and widgets of the interactive system.
 T getWidget()
           
 void setWidgetVisible(java.awt.Component widget, boolean visible)
          Changes the visibility of the given widget and may launch a process of recomposition/adaptation of the UI if needed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

widget

protected T extends java.awt.Component widget
The widget composed by the composer.

Constructor Detail

UIComposer

public UIComposer()
Creates the composer.

Since:
0.2
Method Detail

compose

public abstract void compose(MProgressBar progressBar)
This method composes the user interface using instruments, presentations and widgets of the interactive system.

Parameters:
progressBar - The progress bar that can be used to show the progress of the UI composition. Can be null.

setWidgetVisible

public void setWidgetVisible(java.awt.Component widget,
                             boolean visible)
Changes the visibility of the given widget and may launch a process of recomposition/adaptation of the UI if needed.

Parameters:
widget - The widget to change its visibility.
visible - True: the widget will be visible.
Since:
0.2

getWidget

public T getWidget()
Returns:
The widget composed by the composer.
Since:
0.2