V
- the type of verticesE
- the type of edgespublic class RandomGraphToolBarExtension<V extends Vertex,E extends Edge> extends ToolBarExtension
RandomGraphToolBarExtension(PluginHost, GraphView, AllowedGraphType, LanguageFile, String)
to specify a language file from which
labels, tooltips and messages are read by the given language id. The following language labels are available:
Constructor and Description |
---|
RandomGraphToolBarExtension(PluginHost host,
GraphView<V,E> graphView,
AllowedGraphType type)
Creates a new random graph toolbar extension.
|
RandomGraphToolBarExtension(PluginHost host,
GraphView<V,E> graphView,
AllowedGraphType type,
LanguageFile langFile,
java.lang.String langID)
Creates a new random graph toolbar extension.
|
RandomGraphToolBarExtension(PluginHost host,
GraphView<V,E> graphView,
AllowedGraphType type,
LanguageFile langFile,
java.lang.String langID,
boolean startsWithSeparator)
Creates a new random graph toolbar extension.
|
Modifier and Type | Method and Description |
---|---|
AllowedGraphType |
getAllowedGraphType()
Gets the allowed graph type.
|
javax.swing.Icon |
getMenuOptionIcon()
Gets the icon of the menu option.
|
java.lang.String |
getMenuOptionText()
Gets the text of the option that is shown in the menu of the host application.
|
boolean |
getShowInMenu()
Indicates whether the toolbar extension should be shown in the menu of the host application.
|
void |
setAllowedGraphType(AllowedGraphType type)
Sets the allowed graph type.
|
void |
showMenuOption()
Invokes the option that is shown in the menu of the host application.
|
addButton, addSeparator, apply, isEnabled, remove, setEnabled
public RandomGraphToolBarExtension(PluginHost host, GraphView<V,E> graphView, AllowedGraphType type) throws java.lang.IllegalArgumentException
host
- the host that is used to center the dialog to create graphs in the application or null
(centers the dialog in the screen)graphView
- the graph view on which the extension is appliedtype
- the type that determines whether the user is allowed to set or change the value of the checkbox in the dialog that allows the user to decide whether the graph should be directed or undirectedjava.lang.IllegalArgumentException
- public RandomGraphToolBarExtension(PluginHost host, GraphView<V,E> graphView, AllowedGraphType type, LanguageFile langFile, java.lang.String langID) throws java.lang.IllegalArgumentException
LanguageFile
and a language id to display language dependent
messages or tooltips. The following language labels are available:
host
- the host that is used to center the dialog to create graphs in the application or null
(centers the dialog in the screen)graphView
- the graph view on which the extension is appliedtype
- the type that determines whether the user is allowed to set or change the value of the checkbox in the dialog that allows the user to decide whether the graph should be directed or undirectedlangFile
- the language file with labels for the tooltips of the toolbar buttonslangID
- the language idjava.lang.IllegalArgumentException
- public RandomGraphToolBarExtension(PluginHost host, GraphView<V,E> graphView, AllowedGraphType type, LanguageFile langFile, java.lang.String langID, boolean startsWithSeparator) throws java.lang.IllegalArgumentException
LanguageFile
and a language id to display language dependent
messages or tooltips. The following language labels are available:
host
- the host that is used to center the dialog to create graphs in the application or null
(centers the dialog in the screen)graphView
- the graph view on which the extension is appliedtype
- the type that determines whether the user is allowed to set or change the value of the checkbox in the dialog that allows the user to decide whether the graph should be directed or undirectedlangFile
- the language file with labels for the tooltips of the toolbar buttonslangID
- the language idstartsWithSeparator
- true
if the extension should be separated from the other elements in the toolbar otherwise false
java.lang.IllegalArgumentException
- public AllowedGraphType getAllowedGraphType()
public void setAllowedGraphType(AllowedGraphType type) throws java.lang.IllegalArgumentException
type
- the allowed graph typejava.lang.IllegalArgumentException
- public boolean getShowInMenu()
ToolBarExtension
getShowInMenu
in class ToolBarExtension
true
if the extension or one of its options should be shown in the menu otherwise false
ToolBarExtension.getMenuOptionText()
,
ToolBarExtension.showMenuOption()
public java.lang.String getMenuOptionText()
ToolBarExtension
getMenuOptionText
in class ToolBarExtension
ToolBarExtension.getShowInMenu()
,
ToolBarExtension.showMenuOption()
public javax.swing.Icon getMenuOptionIcon()
ToolBarExtension
getMenuOptionIcon
in class ToolBarExtension
null
if there is no iconpublic void showMenuOption()
ToolBarExtension
showMenuOption
in class ToolBarExtension
ToolBarExtension.getShowInMenu()
,
ToolBarExtension.getMenuOptionText()