story.scheherazade.virgil
Class BrowsableSelector

java.lang.Object
  extended by story.scheherazade.virgil.BrowsableSelector
All Implemented Interfaces:
SCHSelector, SCHSelectorWithBrowser

public class BrowsableSelector
extends java.lang.Object
implements SCHSelectorWithBrowser

An SCHSelector for any element which can be chosen with the ElementBrowser.


Constructor Summary
BrowsableSelector(Virgil virgil, StoryInterpreter story, Verbalizer verbalizer, BrowsableSelectorParams params, ElementBrowser browser, PlannerRepository planners, ElementBrowserMode mode, SCHSelector parentSelector, java.lang.String prompt, TimelineID timeline, boolean inherit, boolean avoidGroups, boolean showSearch)
           
 
Method Summary
 ElementBrowserParams getBrowserParams()
           
 javax.swing.JComponent getPanel()
          Get the JComponent of the GUI front-end of the selector.
 java.lang.Object getSelection()
          Return the value of this selector.
 SCHVariableType getType()
           
 void redoLayout()
          Reconstruct the GUI for this selector.
 boolean selectionReady()
          Returns whether a value has been properly set.
 void setBrowserParams(ElementBrowserParams params)
          Manually specify ElementBrowserParams for the ElementBrowser invoked by this selector
 void setSelection(java.lang.Object selection)
          Set the selection.
 void subSelectorCancelling()
          Indicates to the selector that a subordinate selector (such as the parameters within a ConditionSelector) has been told by the user to cancel the selection process.
 void subSelectorSet(SCHSelector subSelector)
          Inform the Selector that a subordinate selector (such as a sub-selector of PredicateSelector has had a value set.
 void subSelectorSubmitting()
          Indicates to the selector that a subordinate selector (such as the parameters within a ConditionSelector) has been told by the user that their value is final.
 void takeBrowser()
          Take control of the ElementBrowser.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrowsableSelector

public BrowsableSelector(Virgil virgil,
                         StoryInterpreter story,
                         Verbalizer verbalizer,
                         BrowsableSelectorParams params,
                         ElementBrowser browser,
                         PlannerRepository planners,
                         ElementBrowserMode mode,
                         SCHSelector parentSelector,
                         java.lang.String prompt,
                         TimelineID timeline,
                         boolean inherit,
                         boolean avoidGroups,
                         boolean showSearch)
                  throws Scheherexception
Throws:
Scheherexception
Method Detail

setBrowserParams

public void setBrowserParams(ElementBrowserParams params)
                      throws Scheherexception
Manually specify ElementBrowserParams for the ElementBrowser invoked by this selector

Throws:
Scheherexception

getBrowserParams

public ElementBrowserParams getBrowserParams()
                                      throws Scheherexception
Throws:
Scheherexception

getPanel

public javax.swing.JComponent getPanel()
Description copied from interface: SCHSelector
Get the JComponent of the GUI front-end of the selector.

Specified by:
getPanel in interface SCHSelector

subSelectorSet

public void subSelectorSet(SCHSelector subSelector)
Description copied from interface: SCHSelector
Inform the Selector that a subordinate selector (such as a sub-selector of PredicateSelector has had a value set.

Specified by:
subSelectorSet in interface SCHSelector

subSelectorSubmitting

public void subSelectorSubmitting()
Description copied from interface: SCHSelector
Indicates to the selector that a subordinate selector (such as the parameters within a ConditionSelector) has been told by the user that their value is final.

Specified by:
subSelectorSubmitting in interface SCHSelector

subSelectorCancelling

public void subSelectorCancelling()
Description copied from interface: SCHSelector
Indicates to the selector that a subordinate selector (such as the parameters within a ConditionSelector) has been told by the user to cancel the selection process.

This is ONLY ever triggered when the PredicateSelector is initialized with the CANCEL_BUTTON parameter set to true (and, of course, the user chooses to click that button).

Specified by:
subSelectorCancelling in interface SCHSelector

setSelection

public void setSelection(java.lang.Object selection)
                  throws Scheherexception
Description copied from interface: SCHSelector
Set the selection. Throws an exception if the selection is not valid for the selector.

Specified by:
setSelection in interface SCHSelector
Throws:
Scheherexception

selectionReady

public boolean selectionReady()
Description copied from interface: SCHSelector
Returns whether a value has been properly set.

Specified by:
selectionReady in interface SCHSelector

getSelection

public java.lang.Object getSelection()
                              throws Scheherexception
Description copied from interface: SCHSelector
Return the value of this selector. Will throw an exception if no value has yet been properly set.

Specified by:
getSelection in interface SCHSelector
Throws:
Scheherexception

redoLayout

public void redoLayout()
Description copied from interface: SCHSelector
Reconstruct the GUI for this selector.

Specified by:
redoLayout in interface SCHSelector

takeBrowser

public void takeBrowser()
                 throws Scheherexception
Description copied from interface: SCHSelectorWithBrowser
Take control of the ElementBrowser.

Specified by:
takeBrowser in interface SCHSelectorWithBrowser
Throws:
Scheherexception

getType

public SCHVariableType getType()
                        throws Scheherexception
Specified by:
getType in interface SCHSelector
Throws:
Scheherexception


Copyright © 2011 David K. Elson. All Rights Reserved.