org.grinvin.list.actions
Class RenamePanel<T,extends,HasName>
DialogPanel
org.grinvin.list.actions.RenamePanel<T,extends,HasName>
public abstract class RenamePanel<T,extends,HasName>
extends DialogPanel
protected abstract Icon | getIcon() - Return the icon that should be used by default in th e dialog.
|
protected abstract String | getNewLabelText()
|
protected JTextField | getNewName()
|
protected abstract String | getOldLabelText()
|
protected JTextField | getOldName()
|
protected abstract String | getPanelTitle()
|
void | showDialog(T element, Component parent) - Create and activate the dialog for the element of type
HasName
and uses the icon returned by getIcon() .
|
void | showDialog(T element, Icon icon, Component parent) - Create and activate the dialog for the element of type
HasName .
|
RenamePanel
public RenamePanel()
getIcon
protected abstract Icon getIcon()
Return the icon that should be used by default in th e dialog. May return null.
getNewLabelText
protected abstract String getNewLabelText()
getNewName
protected JTextField getNewName()
getOldLabelText
protected abstract String getOldLabelText()
getOldName
protected JTextField getOldName()
getPanelTitle
protected abstract String getPanelTitle()
showDialog
public void showDialog(T element,
Component parent)
Create and activate the dialog for the element of type
HasName
and uses the icon returned by
getIcon()
.
showDialog
public void showDialog(T element,
Icon icon,
Component parent)
Create and activate the dialog for the element of type HasName
.
When finished, the name of the element will be changed, except when the
dialog was canceled by the user. If the elements name is not editable this
method will just return.
element
- Element of which the name can be changed by the user.icon
- Icon to display in the dialog.parent
- Parent of this dialog