public abstract class AbstractPerspective extends javax.swing.JPanel implements Perspective
@PerspectiveInfo
annotation will only need to
override/implement a few methods.TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
AbstractPerspective()
Constructor
|
AbstractPerspective(java.lang.String ID,
java.lang.String title)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
acceptsInstances()
Returns true if this perspective can do something meaningful with a set of
instances
|
Defaults |
getDefaultSettings()
Get the default settings for this perspective (or null if there are none)
|
GUIApplication |
getMainApplication()
Get the main application that this perspective belongs to
|
java.util.List<javax.swing.JMenu> |
getMenus()
Get an ordered list of menus to appear in the main menu bar.
|
javax.swing.Icon |
getPerspectiveIcon()
Get the icon for this perspective
|
java.lang.String |
getPerspectiveID()
Get the ID of this perspective
|
java.lang.String |
getPerspectiveTipText()
Get the tool tip text for this perspective
|
java.lang.String |
getPerspectiveTitle()
Get the title of this perspective
|
void |
instantiationComplete()
No-opp implementation.
|
boolean |
okToBeActive()
Returns true if the perspective is usable at this time.
|
boolean |
requiresLog()
Whether this perspective requires a graphical log to write to
|
void |
setActive(boolean active)
Set active status of this perspective.
|
void |
setInstances(Instances instances)
Set instances (if this perspective can use them)
|
void |
setLoaded(boolean loaded)
Set whether this perspective is "loaded" - i.e.
|
void |
setLog(Logger log)
Set a log to use (if required by the perspective)
|
void |
setMainApplication(GUIApplication main)
Set the main application.
|
void |
settingsChanged()
Called when the user alters settings.
|
void |
terminate()
Subclasses should override this to free any additional resources (e.g., JFrames and threads) when
the perspective is no longer needed.
|
java.lang.String |
toString()
Returns the perspective's title
|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
public AbstractPerspective()
public AbstractPerspective(java.lang.String ID, java.lang.String title)
ID
- the ID of the perspectivetitle
- the title of the the perspectivepublic void terminate()
public void instantiationComplete()
instantiationComplete
in interface Perspective
public boolean okToBeActive()
okToBeActive
in interface Perspective
public void setActive(boolean active)
setActive
in interface Perspective
active
- true if this perspective is the active onepublic void setLoaded(boolean loaded)
setLoaded
in interface Perspective
loaded
- true if the perspective is available in the perspective
toolbar of the KnowledgeFlowpublic void setMainApplication(GUIApplication main)
setMainApplication
in interface Perspective
main
- the main applicationpublic GUIApplication getMainApplication()
getMainApplication
in interface Perspective
public java.lang.String getPerspectiveID()
getPerspectiveID
in interface Perspective
public java.lang.String getPerspectiveTitle()
getPerspectiveTitle
in interface Perspective
public java.lang.String getPerspectiveTipText()
getPerspectiveTipText
in interface Perspective
public javax.swing.Icon getPerspectiveIcon()
getPerspectiveIcon
in interface Perspective
public java.util.List<javax.swing.JMenu> getMenus()
getMenus
in interface Perspective
public void setInstances(Instances instances)
setInstances
in interface Perspective
instances
- the instancespublic boolean acceptsInstances()
acceptsInstances
in interface Perspective
public boolean requiresLog()
requiresLog
in interface Perspective
public Defaults getDefaultSettings()
getDefaultSettings
in interface Perspective
public void settingsChanged()
settingsChanged
in interface Perspective
public void setLog(Logger log)
setLog
in interface Perspective
log
- the graphical log to usepublic java.lang.String toString()
toString
in class java.awt.Component