|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectti.chimera.View
A View
is a "window" created by a plug-in. It can contain
any swing component, or any lightweight (ie. does not have a native peer)
AWT component.
Field Summary | |
protected Main |
main
The main application. |
Constructor Summary | |
View(Main main,
java.lang.String name,
javax.swing.Icon icon)
Class Constructor. |
Method Summary | |
void |
addAction(javax.swing.Action a)
This can be called by the class implementing the view in order to add view and/or plug-in specific actions to this view's popup menu. |
void |
addCloseRunnable(java.lang.Runnable closeRunnable)
What to do when closing... |
boolean |
close()
Called to cause this view to close. |
void |
closeHook()
Deprecated. see addCloseRunnable(java.lang.Runnable) |
abstract java.awt.Component |
getComponent()
Return the GUI component. |
java.lang.String |
getDescriptor()
The "descriptor" is a string that has both the name of the view and the name of the plugin owning the view encoded in it. |
Dock |
getDock()
Get the dock that this view is in. |
javax.swing.Icon |
getIcon()
Get the icon for this view. |
java.lang.String |
getName()
Get the name of this view. |
javax.swing.JPopupMenu |
getPopupMenu()
Get the popup menu. |
boolean |
isClosable()
Called by close() in order to determine if this view can be
closed. |
void |
removeAction(javax.swing.Action a)
This can be called by the class implementing the view in order to remove view and/or plug-in specific actions to this view's popup menu. |
void |
removeCloseRunnable(java.lang.Runnable closeRunnable)
|
void |
setIcon(javax.swing.Icon icon)
Set the icon for this view. |
void |
setName(java.lang.String name)
Set the name for this view. |
void |
toForeground()
Make this view the one that is currently in focus. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Main main
Constructor Detail |
public View(Main main, java.lang.String name, javax.swing.Icon icon)
main
- the main applicationname
- the name of the viewicon
- the optional icon, or null
Method Detail |
public abstract java.awt.Component getComponent()
Care should be taken if the component is not a swing component, as heavyweight AWT components cause problems, especially when the docks are displayed in DESKTOP_MODE.
public final javax.swing.JPopupMenu getPopupMenu()
addAction(javax.swing.Action)
public boolean isClosable()
close()
in order to determine if this view can be
closed. If this method returns false
then the close is
aborted. By default it always returns true
, but can
be overriden as needed.
true
to permit the view to be closed, and
false
to prevent itpublic final boolean close()
closeHook()
method which is
called by this method.
closeHook()
public void closeHook()
addCloseRunnable(java.lang.Runnable)
close()
public void toForeground()
public java.lang.String getName()
public java.lang.String getDescriptor()
The method for the encoding is currently unspecified, and possibly subject to change.
public void setName(java.lang.String name)
name
- the name of the viewpublic javax.swing.Icon getIcon()
null
if no iconpublic void setIcon(javax.swing.Icon icon)
icon
- the optional icon, or null
public void addAction(javax.swing.Action a)
Note: this is only public
in order for it to be accessible
to scripts that subclass this class. You should use it as if it were
protected
.
a
- an action, or null
to add seperatorpublic void removeAction(javax.swing.Action a)
Note: this is only public
in order for it to be accessible
to scripts that subclass this class. You should use it as if it were
protected
.
a
- an action, or null
to add seperatorpublic Dock getDock()
null
if this view isn't in a dockpublic void addCloseRunnable(java.lang.Runnable closeRunnable)
public void removeCloseRunnable(java.lang.Runnable closeRunnable)
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |