org.grinvin.list.actions

Class RenameAction<T,extends,HasName>

Implemented Interfaces:
ListSelectionListener

public class RenameAction<T,extends,HasName>
extends AbstractListAction<E>

List action which can be used to rename an element that implements the interface HasName. A RenamePanel is used to change the name of the selected element. An action of this type is by default only enabled when exactly one elemented that has an editable name is selected.

Field Summary

Fields inherited from class org.grinvin.list.actions.AbstractListAction<E>

list, selection

Constructor Summary

RenameAction(TypedListModel list, ListSelectionModel selection, RenamePanel<T,extends,HasName> renamePanel, Component parent, ResourceBundle bundle, String resourceID)
Create an action of this type for the given TypedListModel with the given ListSelectionModel that uses the given RenamePanel and has the given parent.
RenameAction(TypedListModel list, ListSelectionModel selection, RenamePanel<T,extends,HasName> renamePanel, ResourceBundle bundle, String resourceID)
Create an action of this type for the given TypedListModel with the given ListSelectionModel that uses the given RenamePanel and has null as parent.

Method Summary

void
actionPerformed(ActionEvent ev)
void
setParent(Component parent)
Set the parent for the dialog window.
@Override
void setEnabled()

Methods inherited from class org.grinvin.list.actions.AbstractListAction<E>

getSelectedElements, setEnabled, valueChanged

Constructor Details

RenameAction

public RenameAction(TypedListModel list,
                    ListSelectionModel selection,
                    RenamePanel<T,extends,HasName> renamePanel,
                    Component parent,
                    ResourceBundle bundle,
                    String resourceID)
Create an action of this type for the given TypedListModel with the given ListSelectionModel that uses the given RenamePanel and has the given parent.

RenameAction

public RenameAction(TypedListModel list,
                    ListSelectionModel selection,
                    RenamePanel<T,extends,HasName> renamePanel,
                    ResourceBundle bundle,
                    String resourceID)
Create an action of this type for the given TypedListModel with the given ListSelectionModel that uses the given RenamePanel and has null as parent.

Method Details

actionPerformed

public void actionPerformed(ActionEvent ev)

setParent

public void setParent(Component parent)
Set the parent for the dialog window.

void setEnabled

public @Override void setEnabled()