JAC project
AOPSYS
CEDRIC & LIP6 labs

org.objectweb.jac.aspects.gui
Interface View

All Superinterfaces:
ViewIdentity
All Known Subinterfaces:
CollectionView, CompositeView, CustomizedView, DialogView, FieldEditor, FieldView, MenuView, MethodView, PanelView, ReferenceEditor, StatusView, TableCellViewer, TabsView
All Known Implementing Classes:
AbstractCollection, AbstractCollection, AbstractCompositeView, AbstractCompositeView, AbstractFieldEditor, AbstractFieldEditor, AbstractFieldView, AbstractMenu, AbstractView, AbstractView, AppletView, AttachmentViewer, AttachmentViewer, BooleanEditor, BooleanEditor, CurrencyViewer, Customized, DateEditor, DateHourEditor, DateHourViewer, DateViewer, DesktopView, Dialog, Dialog, EmbeddedMethod, EnumViewer, FileEditor, FloatViewer, ImageURLEditor, ImageURLViewer, IndicesSelector, Menu, Menu, MenuBar, MenuBar, Method, ObjectChooser, Panel, PasswordFieldEditor, PrimitiveFieldEditor, ReferenceView, ReferenceView, StatusBar, StatusBar, SwingCustomized, SwingEmptyView, SwingFieldView, SwingLabel, SwingMethodView, SwingPanelView, SwingTabbedView, Tabs, TextEditor, TextViewer, ToolBar, ToolBar, Tree, Tree, URLEditor, URLEditor

public interface View
extends ViewIdentity


Method Summary
 void close()
          Close this view.
 DisplayContext getContext()
           
 String getDescription()
          Gets the description of this view.
 ViewFactory getFactory()
          Gets the factory.
 String getLabel()
          Gets the view's label (identifier).
 MethodItem getMessage()
          Gets the dynamic message.
 View getParentView()
          Gets the parent view of this view.
 View getRootView()
          Gets the ancestor view whose parent is null
 String getStyle()
          Gets the user-defined style for this view.
 Border getViewBorder()
          Gets the border for this view.
 boolean isClosed()
          Tells if this view has been closed by the GUI or the user.
 boolean isDescendantOf(View ancestor)
          Tells wether this view has a given view in its ancestors
 void setContext(DisplayContext context)
          Sets the display context for this view.
 void setDescription(String description)
          Sets a static message to be display by the view when opened.
 void setFactory(ViewFactory factory)
          Sets the factory for this view (WEB, SWING or other supported factory).
 void setFocus(FieldItem field, Object option)
          Focus a field of an object's view.
 void setHeight(int height)
          Sets the prefered height for this view.
 void setLabel(String label)
          Sets the label (the identifier) of the view.
 void setMessage(MethodItem method)
          Sets a dynamic message to be displayed by the view when opened.
 void setParentView(View view)
          Sets the parent view of this view (a composite view).
 void setStyle(String style)
          Sets the view style.
 void setViewBorder(Border border)
          Sets a border for this view.
 void setWidth(int width)
          Sets the prefered width for this view.
 void validate()
          Validate this view: its content may be saved when this method is upcalled.
 
Methods inherited from interface org.objectweb.jac.aspects.gui.ViewIdentity
getParameters, getType, setParameters, setType
 

Method Detail

setLabel

public void setLabel(String label)
Sets the label (the identifier) of the view.

Parameters:
label - a string that identifies the view

getLabel

public String getLabel()
Gets the view's label (identifier).

Returns:
the view's label

setMessage

public void setMessage(MethodItem method)
Sets a dynamic message to be displayed by the view when opened.

Parameters:
method - the method that returns a string to be dislayed
See Also:
setDescription(String)

getMessage

public MethodItem getMessage()
Gets the dynamic message.

Returns:
the dynamic message

setDescription

public void setDescription(String description)
Sets a static message to be display by the view when opened.

Parameters:
description - a string to be displayed as is
See Also:
setMessage(MethodItem)

getDescription

public String getDescription()
Gets the description of this view.

Returns:
the description

setContext

public void setContext(DisplayContext context)
Sets the display context for this view.

The display context contains the factory that is used for this view.


getContext

public DisplayContext getContext()
Returns:
the DisplayContext of the view

setFactory

public void setFactory(ViewFactory factory)
Sets the factory for this view (WEB, SWING or other supported factory).


getFactory

public ViewFactory getFactory()
Gets the factory.


setWidth

public void setWidth(int width)
Sets the prefered width for this view.


setHeight

public void setHeight(int height)
Sets the prefered height for this view.


close

public void close()
Close this view. This should be upcalled when the view is closed in order to free resources or close other dependant views.


isClosed

public boolean isClosed()
Tells if this view has been closed by the GUI or the user.


validate

public void validate()
Validate this view: its content may be saved when this method is upcalled.


setStyle

public void setStyle(String style)
Sets the view style. The style can be exploited in different maners depending on the GUI supports (e.g. with CSS for the WEB). Styles are user-defined.


getStyle

public String getStyle()
Gets the user-defined style for this view.

Returns:
the style, null if undefined

setViewBorder

public void setViewBorder(Border border)
Sets a border for this view.


getViewBorder

public Border getViewBorder()
Gets the border for this view.

Returns:
the border, null if undefined

setParentView

public void setParentView(View view)
Sets the parent view of this view (a composite view).

See Also:
CompositeView

getParentView

public View getParentView()
Gets the parent view of this view.

See Also:
CompositeView

getRootView

public View getRootView()
Gets the ancestor view whose parent is null


isDescendantOf

public boolean isDescendantOf(View ancestor)
Tells wether this view has a given view in its ancestors

Parameters:
ancestor - the ancestor

setFocus

public void setFocus(FieldItem field,
                     Object option)
Focus a field of an object's view.

Parameters:
field - the field to focus
option - an extra option

Contact JAC development team:
Renaud Pawlak
Lionel Seinturier
Laurent Martelli