HEADER

ru.biosoft.gui
Interface ViewPart

All Known Subinterfaces:
EditorPart
All Known Implementing Classes:
EditorsManager, HtmlView, PropertiesView, ViewPartSupport

public interface ViewPart
extends TransactionListener

Interface to be implemented by viewer for some part of data. It defines component that will be used to show the data and provides TransactionListener that will be notified about data changes. When transaction is completed then view should be updated if necessary.


Field Summary
 final static floatDEFAULT_PRIORITY
           
 final static StringPRIORITY
          Constant used by ViewPart action to specify view parts order when they are located in some tabbed pane or other container.
 final static StringSTATIC_VIEW
          The constant to idicate that view part do not depends from the data, that it is not depends from model passed in explore method.

Method Summary
 booleancanExplore(Object model)
           
 voidexplore(Object model, Document document)
          Notifies the view part that it should explore new data.
 ActiongetAction()
          Return action that contains information about the view part (display name, icon, etc).
 Action[]getActions()
          Returns actions that are specific for this view part.
 DocumentgetDocument()
          Returns document that is edited.
 ObjectgetModel()
           
 JComponentgetView()
          Returns the view.

Field Detail

DEFAULT_PRIORITY

public final static float DEFAULT_PRIORITY

PRIORITY

public final static String PRIORITY
Constant used by ViewPart action to specify view parts order when they are located in some tabbed pane or other container.

STATIC_VIEW

public final static String STATIC_VIEW
The constant to idicate that view part do not depends from the data, that it is not depends from model passed in explore method.
Method Detail

canExplore

public boolean canExplore(Object model)
returns whether this view part can explore the specified data. If the method return false then parent can disable this tab.

explore

public void explore(Object model, Document document)
Notifies the view part that it should explore new data.

getAction

public Action getAction()
Return action that contains information about the view part (display name, icon, etc).

getActions

public Action[] getActions()
Returns actions that are specific for this view part.

getDocument

public Document getDocument()
Returns document that is edited.

getModel

public Object getModel()
returns the explored data. To indicate that this view part do not depends from the data the method should return {@link STATIC_VIEW}

getView

public JComponent getView()
Returns the view.

Association Links

to Class java.lang.String

Constant used by ViewPart action to specify view parts order when they are located in some tabbed pane or other container.

to Class java.lang.String

The constant to idicate that view part do not depends from the data, that it is not depends from model passed in explore method.

FOOTER

BOTTOM