Package weka.gui
Interface Perspective
-
- All Known Implementing Classes:
AbstractPerspective,AssociationsPanel,AttributeSelectionPanel,AttributeSummaryPerspective,ClassifierPanel,ClustererPanel,Experimenter,MainKFPerspective,PreprocessPanel,ScatterPlotMatrixPerspective,SimpleCLIPanel,SQLViewerPerspective,VisualizePanel
public interface PerspectiveInterface for GUI elements that can appear as a perspective in aGUIApplication. Clients will typically extendAbstractPerspective.- Version:
- $Revision: $
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanacceptsInstances()Returns true if this perspective can do something meaningful with a set of instancesDefaultsgetDefaultSettings()Get the default settings for this perspective (or null if there are none)GUIApplicationgetMainApplication()Get the main application that this perspective belongs tojava.util.List<javax.swing.JMenu>getMenus()Get an ordered list of menus to appear in the main menu bar.javax.swing.IcongetPerspectiveIcon()Get the icon for this perspectivejava.lang.StringgetPerspectiveID()Get the ID of this perspectivejava.lang.StringgetPerspectiveTipText()Get the tool tip text for this perspectivejava.lang.StringgetPerspectiveTitle()Get the title of this perspectivevoidinstantiationComplete()Gets called when startup of the application has completed.booleanokToBeActive()Returns true if this perspective is OK with being an active perspective - i.e.booleanrequiresLog()Whether this perspective requires a graphical log to write tovoidsetActive(boolean active)Set active status of this perspective.voidsetInstances(Instances instances)Set instances (if this perspective can use them)voidsetLoaded(boolean loaded)Set whether this perspective is "loaded" - i.e.voidsetLog(Logger log)Set a log to use (if required by the perspective)voidsetMainApplication(GUIApplication main)Set the main application.voidsettingsChanged()Called when the user alters settings.
-
-
-
Method Detail
-
instantiationComplete
void instantiationComplete()
Gets called when startup of the application has completed. At this point, and only at this point, is it guaranteed that a perspective has access to its hosting application and the PerspectiveManager. Implementations can use this method to complete their initialization in this method if this requires access to information from the main application and/or the PerspectiveManager (i.e. knowledge about what other perspectives are available).
-
okToBeActive
boolean okToBeActive()
Returns true if this perspective is OK with being an active perspective - i.e. the user can click on this perspective at this time in the perspective toolbar. For example, a Perspective might return false from this method if it needs a set of instances to operate but none have been supplied yet.- Returns:
- true if this perspective can be active at the current time
-
setActive
void setActive(boolean active)
Set active status of this perspective. True indicates that this perspective is the visible active perspective in the application- Parameters:
active- true if this perspective is the active one
-
setLoaded
void setLoaded(boolean loaded)
Set whether this perspective is "loaded" - i.e. whether or not the user has opted to have it available in the perspective toolbar. The perspective can make the decision as to allocating or freeing resources on the basis of this. Note that the main application and perspective manager instances are not available to the perspective until the instantiationComplete() method has been called.- Parameters:
loaded- true if the perspective is available in the perspective toolbar of the KnowledgeFlow
-
setMainApplication
void setMainApplication(GUIApplication main)
Set the main application. Gives other perspectives access to information provided by the main application- Parameters:
main- the main application
-
getMainApplication
GUIApplication getMainApplication()
Get the main application that this perspective belongs to- Returns:
- the main application that this perspective belongs to
-
getPerspectiveID
java.lang.String getPerspectiveID()
Get the ID of this perspective- Returns:
- the ID of this perspective
-
getPerspectiveTitle
java.lang.String getPerspectiveTitle()
Get the title of this perspective- Returns:
- the title of this perspective
-
getPerspectiveIcon
javax.swing.Icon getPerspectiveIcon()
Get the icon for this perspective- Returns:
- the icon for this perspective
-
getPerspectiveTipText
java.lang.String getPerspectiveTipText()
Get the tool tip text for this perspective- Returns:
- the tool tip text for this perspective
-
getMenus
java.util.List<javax.swing.JMenu> getMenus()
Get an ordered list of menus to appear in the main menu bar. Return null for no menus- Returns:
- a list of menus to appear in the main menu bar or null for no menus
-
getDefaultSettings
Defaults getDefaultSettings()
Get the default settings for this perspective (or null if there are none)- Returns:
- the default settings for this perspective, or null if the perspective does not have any settings
-
settingsChanged
void settingsChanged()
Called when the user alters settings. The settings altered by the user are not necessarily ones related to this perspective
-
acceptsInstances
boolean acceptsInstances()
Returns true if this perspective can do something meaningful with a set of instances- Returns:
- true if this perspective accepts instances
-
setInstances
void setInstances(Instances instances)
Set instances (if this perspective can use them)- Parameters:
instances- the instances
-
requiresLog
boolean requiresLog()
Whether this perspective requires a graphical log to write to- Returns:
- true if a log is needed by this perspective
-
setLog
void setLog(Logger log)
Set a log to use (if required by the perspective)- Parameters:
log- the graphical log to use
-
-