org.grinvin.list.actions

Class RenamePanel<T,extends,HasName>

Known Direct Subclasses:
GraphRenamePanel, WorksheetRenamePanel

public abstract class RenamePanel<T,extends,HasName>
extends DialogPanel

Author:
adpeeter

Constructor Summary

RenamePanel()

Method Summary

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.

Constructor Details

RenamePanel

public RenamePanel()

Method Details

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)

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.
Parameters:
element - Element of which the name can be changed by the user.
icon - Icon to display in the dialog.
parent - Parent of this dialog