Gridarta Editor
net.sf.gridarta.gui.utils.SwingUtils Class Reference

Utility class for Swing related functions. More...

+ Collaboration diagram for net.sf.gridarta.gui.utils.SwingUtils:

Static Public Member Functions

static void addAction (@NotNull final JComponent textComponent, @NotNull final Action action)
 Adds an accelerator key for a component. More...
 
static Component createLabel (@NotNull final String key, @Nullable final Component component)
 Create a javax.swing.JLabel instance. More...
 

Private Member Functions

 SwingUtils ()
 Private constructor to prevent instantiation. More...
 

Static Private Attributes

static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta.gui.panel.tools")
 Action Builder. More...
 

Detailed Description

Utility class for Swing related functions.

Author
Andreas Kirschbaum

Definition at line 37 of file SwingUtils.java.

Constructor & Destructor Documentation

◆ SwingUtils()

net.sf.gridarta.gui.utils.SwingUtils.SwingUtils ( )
private

Private constructor to prevent instantiation.

Definition at line 48 of file SwingUtils.java.

Member Function Documentation

◆ addAction()

static void net.sf.gridarta.gui.utils.SwingUtils.addAction ( @NotNull final JComponent  textComponent,
@NotNull final Action  action 
)
static

Adds an accelerator key for a component.

The accelerator key is extracted from the action to be added. If the action has no attached accelerator key, nothing is added.

Parameters
textComponentthe text component to add to
actionthe action to add

Definition at line 71 of file SwingUtils.java.

References net.sf.gridarta.utils.ActionUtils.getActionId().

Referenced by net.sf.gridarta.gui.dialog.findarchetypes.FindArchetypesDialog< G, A, R >.FindArchetypesDialog(), net.sf.gridarta.gui.dialog.goexit.GoExitDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.GoExitDialog(), and net.sf.gridarta.gui.dialog.gomap.GoMapDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.GoMapDialog().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createLabel()

static Component net.sf.gridarta.gui.utils.SwingUtils.createLabel ( @NotNull final String  key,
@Nullable final Component  component 
)
static

Member Data Documentation

◆ ACTION_BUILDER

final ActionBuilder net.sf.gridarta.gui.utils.SwingUtils.ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta.gui.panel.tools")
staticprivate

Action Builder.

Definition at line 43 of file SwingUtils.java.


The documentation for this class was generated from the following file: