Package xal.app.knobs

Class KnobsWindow

    • Field Detail

      • _model

        protected final KnobsModel _model
        The main model for the document
      • _controller

        protected final KnobsController _controller
        The controller holds the selection state of groups and applications
      • _workspace

        protected Container _workspace
        The knobs workspace which displays selected knobs
      • _workPane

        protected JSplitPane _workPane
        split pane which contains the workspace
      • _knobEditDisplayer

        protected KnobEditDisplayer _knobEditDisplayer
        displays and hides the knob editor
      • _mainPane

        protected JSplitPane _mainPane
        The main pane
      • _selectorPane

        protected JSplitPane _selectorPane
        The selector pane
      • _knobViews

        protected Map<Knob,​KnobView> _knobViews
        table of cached knob views keyed by knob
    • Constructor Detail

      • KnobsWindow

        public KnobsWindow​(xal.extension.application.XalDocument aDocument)
        Constructor
    • Method Detail

      • customizeCommands

        public void customizeCommands​(xal.extension.application.Commander commander)
        Register actions specific to this document instance.
        Overrides:
        customizeCommands in class xal.extension.application.XalWindow
        Parameters:
        commander - The commander with which to register the custom commands.
      • getKnobView

        protected KnobView getKnobView​(Knob knob)
        Get a knob view from the cache for the specified knob creating one if necessary
      • getController

        public KnobsController getController()
        Get the knobs controller
      • usesToolbar

        public boolean usesToolbar()
        Do not show the toolbar.
        Overrides:
        usesToolbar in class xal.extension.application.XalWindow
        Returns:
        false
      • makeContents

        protected void makeContents()
        Construct the contents of this window
      • showWindow

        public void showWindow()
        Show this window
        Specified by:
        showWindow in interface xal.extension.application.XalDocumentView
        Overrides:
        showWindow in class xal.extension.application.XalWindow
      • getIndexAtEvent

        protected static int getIndexAtEvent​(JList<String> list,
                                             Point location)
        Convenience method for getting the index of the list cell enclosing the specified point. Unlike locationToIndex(), this method tests that the location is actually in the bounds of the cell. This is important to avoid associating an event that occurs at the bottom of the list but outside of any cell.
        Parameters:
        list - The JList to test
        location - The location of the event as a point
        Returns:
        the cell in the list corresponding to the location or -1 if no cell is associated
      • postMessage

        public void postMessage​(Object source,
                                String message)
        Post an application wide message from the source
        Parameters:
        source - The source of the message
        message - The message posted
      • postErrorMessage

        public void postErrorMessage​(Object source,
                                     String message)
        Post an application wide error message from the source
        Parameters:
        source - The source of the message
        message - The message posted
      • displayMessage

        protected void displayMessage​(String message,
                                      String fontColor)
        Display a message in the message board with the specified font color
        Parameters:
        message - The message to display
        fontColor - The font color used to display the message
      • displayMessage

        protected void displayMessage​(String message)
        Display a message in the message board with a font color of blue.
        Parameters:
        message - The message to display
      • displayErrorMessage

        protected void displayErrorMessage​(String message)
        Display an error message in the message board with a font color of red.
        Parameters:
        message - The message to display
      • makeGroupView

        protected Component makeGroupView()
        Build the view for displaying and managing the groups. This includes a label, a scrollable JList of the groups and a button for adding a new group.
        Returns:
        The view for displaying and managing the groups
      • makeKnobsView

        protected Component makeKnobsView()
        Build the view for listing the knobs.
        Returns:
        The view for displaying and managing the applications
      • makeWorkspace

        protected Container makeWorkspace()
        Construct the view for displaying the selected knobs details.
        Returns:
        a view for displaying selected knobs details