Interface JMapGuiFactory


public interface JMapGuiFactory
This interface is used to create GUI components depending of the implementation.
  • Method Details

    • createMenu

      JMenu createMenu(String menuTitle)
      Creates a new menu.
      Parameters:
      menuTitle - the menu title
      Returns:
      a menu
    • createToolBar

      ToolBar createToolBar(String key, String toolBarTitle)
      Creates a new tool bar.
      Parameters:
      key - a unique identifier
      toolBarTitle - the tool bar title
      Returns:
      a toolbar
    • createButton

      AbstractButton createButton(AbstractAction abstractAction)
      Creates a simple button.
      Parameters:
      abstractAction - the action used to create the button
      Returns:
      a button
    • createSplitButton

      AbstractButton createSplitButton(AbstractAction[] abstractActions, int defaultActionIx, boolean updateWithUserChoice)
      Creates a button with a combination of button and menu. There is a line in the middle of the button that splits the button into two portions. The portion before the line is a button. User can click on it and trigger an action. The portion after the line is a menu. User can click on it to show a normal menu.
      Parameters:
      abstractActions - a list of actions used to create the button
      defaultActionIx - the index of the default action shown
      updateWithUserChoice - if true, the button main action will be update with the user choice
      Returns:
      a split button
    • createSplitButton

      AbstractButton createSplitButton(AbstractAction[] abstractActions, int defaultActionIx, boolean updateWithUserChoice, boolean alwaysDropdown)
      Creates a button with a combination of button and menu. There is a line in the middle of the button that splits the button into two portions. The portion before the line is a button. User can click on it and trigger an action. The portion after the line is a menu. User can click on it to show a normal menu.
      Parameters:
      abstractActions - a list of actions used to create the button
      defaultActionIx - the index of the default action shown
      updateWithUserChoice - if true, the button main action will be update with the user choice
      alwaysDropdown - if true, the button drop down menu will always show
      Returns:
      a split button
      Since:
      6.0
    • createToggleButton

      AbstractButton createToggleButton(AbstractAction abstractAction)
      Creates a toggle button. This button has an "on / off" state.
      Parameters:
      abstractAction - the action used to create the button
      Returns:
      a toggle button
    • createToggleButton

      AbstractButton createToggleButton(AbstractAction abstractAction, ButtonGroup buttonGroup)
      Creates a toggle button and add it to the specified button group. Only one button can be "on" in a button group.
      Parameters:
      abstractAction - the action used to create the button
      buttonGroup - the button group to add the button
      Returns:
      a toggle button
    • createToggleSplitButton

      AbstractButton createToggleSplitButton(AbstractAction[] abstractActions, int defaultActionIx, ButtonGroup buttonGroup)
      Creates a button with a combination of button and menu. There is a line in the middle of the button that splits the button into two portions. The portion before the line is a button. User can click on it activate the button. The portion after the line is a menu. User can click on it to show a normal menu.
      Parameters:
      abstractActions - a list of actions used to create the button
      defaultActionIx - the index of the default action shown
      buttonGroup - the button group to add the button
      Returns:
      a toggle split button
    • createStatusBar

      JPanel createStatusBar()
      Creates an application status bar.
      Returns:
      a panel representing a status bar