net.sf.tm.plugin.ui
Class AbstractServerDialog

java.lang.Object
  extended byorg.eclipse.jface.window.Window
      extended byorg.eclipse.jface.dialogs.Dialog
          extended byorg.eclipse.jface.dialogs.TitleAreaDialog
              extended bynet.sf.tm.plugin.ui.AbstractServerDialog
Direct Known Subclasses:
EditServerDialog, NewServerDialog

public abstract class AbstractServerDialog
extends TitleAreaDialog

Base class for all server dialogs. Provides the panel with the input fields needed to edit a server.

Version:
$Id: AbstractServerDialog.java,v 1.8 2004/03/28 16:21:35 apataki Exp $
Author:
Andreas Pataki

Nested Class Summary
 
Nested classes inherited from class org.eclipse.jface.window.Window
Window.IExceptionHandler
 
Field Summary
 
Fields inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
DLG_IMG_TITLE_BANNER, DLG_IMG_TITLE_ERROR, INFO_MESSAGE, WARNING_MESSAGE
 
Fields inherited from class org.eclipse.jface.dialogs.Dialog
buttonBar, dialogArea, DLG_IMG_ERROR, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING
 
Fields inherited from class org.eclipse.jface.window.Window
CANCEL, OK
 
Constructor Summary
AbstractServerDialog(TomcatServer server, Shell parentShell)
           
 
Method Summary
protected  void addToHistory(List history, String newEntry)
          Adds an entry to a history, while taking care of duplicate history items and excessively long histories.
protected  String[] addToHistory(String[] history, String newEntry)
          Adds an entry to a history, while taking care of duplicate history items and excessively long histories.
protected  Control createButtonBar(Composite parent)
           
protected  Control createDialogArea(Composite parent)
           
 TomcatServer getServer()
           
protected  String localizeString(String key)
          Helper method for calling the ContextManagerPlugin.getLocalizedString(String) method in the ContextManagerPlugin class.
protected  void okPressed()
           
abstract  void setDialogText()
          This method must be overwritten by the impementing server dialog to set the text which should be displayed in the text area of the dialog.
 
Methods inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
createContents, getInitialSize, getTitleArea, getTitleImageLabel, setErrorMessage, setMessage, setMessage, setTitle, setTitleAreaColor, setTitleImage
 
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, buttonPressed, cancelPressed, close, configureShell, constrainShellSize, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, createButton, createButtonsForButtonBar, getButton, getButtonBar, getCancelButton, getDialogArea, getImage, getOKButton, initializeBounds, initializeDialogUnits, setButtonLayoutData, setButtonLayoutFormData
 
Methods inherited from class org.eclipse.jface.window.Window
create, createShell, getContents, getDefaultImage, getInitialLocation, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setExceptionHandler, setReturnCode, setShellStyle, setWindowManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractServerDialog

public AbstractServerDialog(TomcatServer server,
                            Shell parentShell)
Parameters:
parentShell - shell
server - The server which should be edited.
Method Detail

getServer

public TomcatServer getServer()
Returns:
The edited server data.

createDialogArea

protected Control createDialogArea(Composite parent)
See Also:
TitleAreaDialog.createDialogArea(org.eclipse.swt.widgets.Composite)

setDialogText

public abstract void setDialogText()
This method must be overwritten by the impementing server dialog to set the text which should be displayed in the text area of the dialog.


createButtonBar

protected Control createButtonBar(Composite parent)
See Also:
Dialog.createButtonBar(org.eclipse.swt.widgets.Composite)

okPressed

protected void okPressed()
See Also:
Dialog.okPressed()

addToHistory

protected String[] addToHistory(String[] history,
                                String newEntry)
Adds an entry to a history, while taking care of duplicate history items and excessively long histories. The assumption is made that all histories should be of length COMBO_HISTORY_LENGTH.

Parameters:
history - the current history
newEntry - the entry to add to the history
Returns:
the history with the new entry appended

addToHistory

protected void addToHistory(List history,
                            String newEntry)
Adds an entry to a history, while taking care of duplicate history items and excessively long histories. The assumption is made that all histories should be of length COMBO_HISTORY_LENGTH.

Parameters:
history - the current history
newEntry - the entry to add to the history

localizeString

protected String localizeString(String key)
Helper method for calling the ContextManagerPlugin.getLocalizedString(String) method in the ContextManagerPlugin class.



Copyright © 2003-2004 Andreas Pataki. All Rights Reserved.