Interface JMapGuiFactory
public interface JMapGuiFactory
This interface is used to create GUI components depending of the implementation.
-
Method Summary
Modifier and TypeMethodDescriptioncreateButton(AbstractAction abstractAction) Creates a simple button.createMenu(String menuTitle) Creates a new menu.createSplitButton(AbstractAction[] abstractActions, int defaultActionIx, boolean updateWithUserChoice) Creates a button with a combination of button and menu.createSplitButton(AbstractAction[] abstractActions, int defaultActionIx, boolean updateWithUserChoice, boolean alwaysDropdown) Creates a button with a combination of button and menu.Creates an application status bar.createToggleButton(AbstractAction abstractAction) Creates a toggle button.createToggleButton(AbstractAction abstractAction, ButtonGroup buttonGroup) Creates a toggle button and add it to the specified button group.createToggleSplitButton(AbstractAction[] abstractActions, int defaultActionIx, ButtonGroup buttonGroup) Creates a button with a combination of button and menu.createToolBar(String key, String toolBarTitle) Creates a new tool bar.
-
Method Details
-
createMenu
Creates a new menu.- Parameters:
menuTitle- the menu title- Returns:
- a menu
-
createToolBar
Creates a new tool bar.- Parameters:
key- a unique identifiertoolBarTitle- the tool bar title- Returns:
- a toolbar
-
createButton
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 buttondefaultActionIx- the index of the default action shownupdateWithUserChoice- 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 buttondefaultActionIx- the index of the default action shownupdateWithUserChoice- if true, the button main action will be update with the user choicealwaysDropdown- if true, the button drop down menu will always show- Returns:
- a split button
- Since:
- 6.0
-
createToggleButton
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
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 buttonbuttonGroup- 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 buttondefaultActionIx- the index of the default action shownbuttonGroup- 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
-