Package weka.gui
Interface Perspective
- All Known Implementing Classes:
AbstractPerspective
,AssociationsPanel
,AttributeSelectionPanel
,AttributeSummaryPerspective
,ClassifierPanel
,ClustererPanel
,Experimenter
,MainKFPerspective
,PreprocessPanel
,ScatterPlotMatrixPerspective
,SimpleCLIPanel
,SQLViewerPerspective
,VisualizePanel
public interface Perspective
Interface for GUI elements that can appear as a perspective in a
GUIApplication
. Clients will typically extend
AbstractPerspective
.- Version:
- $Revision: $
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if this perspective can do something meaningful with a set of instancesGet the default settings for this perspective (or null if there are none)Get the main application that this perspective belongs togetMenus()
Get an ordered list of menus to appear in the main menu bar.Get the icon for this perspectiveGet the ID of this perspectiveGet the tool tip text for this perspectiveGet the title of this perspectivevoid
Gets called when startup of the application has completed.boolean
Returns true if this perspective is OK with being an active perspective - i.e.boolean
Whether this perspective requires a graphical log to write tovoid
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
Set a log to use (if required by the perspective)void
Set the main application.void
Called when the user alters settings.
-
Method Details
-
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
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
String getPerspectiveID()Get the ID of this perspective- Returns:
- the ID of this perspective
-
getPerspectiveTitle
String getPerspectiveTitle()Get the title of this perspective- Returns:
- the title of this perspective
-
getPerspectiveIcon
Icon getPerspectiveIcon()Get the icon for this perspective- Returns:
- the icon for this perspective
-
getPerspectiveTipText
String getPerspectiveTipText()Get the tool tip text for this perspective- Returns:
- the tool tip text for this perspective
-
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
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
Set a log to use (if required by the perspective)- Parameters:
log
- the graphical log to use
-