amber.server.panel
Class TextInputDialog

java.lang.Object
  |
  +--java.awt.Component
        |
        +--amber.server.component.ComponentHandler
              |
              +--amber.server.component.PanelHandler
                    |
                    +--amber.server.panel.BasePanel
                          |
                          +--amber.server.panel.BaseFrame
                                |
                                +--amber.server.panel.ModalBaseFrame
                                      |
                                      +--amber.server.panel.TextInputDialog
All Implemented Interfaces:
java.awt.event.ActionListener, ApplicationInterface, ComponentWindowListener, ContainerHandler, java.util.EventListener, java.awt.image.ImageObserver, java.awt.ItemSelectable, java.awt.MenuContainer, java.io.Serializable

public class TextInputDialog
extends ModalBaseFrame
implements java.io.Serializable, java.awt.event.ActionListener, ComponentWindowListener

This class allows a user to enter a single line of text.

Version:
1.0.0
Author:
Dr. David J. Knowles
See Also:
ModalBaseFrame, Serialized Form

Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Field Summary
static int BaseHeight
          The starting height of this dialog.
static int BaseWidth
          The starting width of this dialog.
static java.lang.String DefaultCaption
          This is the default caption for the dialog.
static java.lang.String DefaultTitle
          This is the default title for the dialog.
static long TextInputDialogTimeout
          This constant defines how long the dialog will wait for the remote user.
 
Fields inherited from class amber.server.panel.BaseFrame
title
 
Fields inherited from class amber.server.panel.BasePanel
autoDoLayoutState, xOffset, yOffset
 
Fields inherited from class amber.server.component.PanelHandler
AddOperation, autoRedrawState, drawOperations, InsertOperation, PaintPanel, PanelNextAvailableCommand, postInPacketListeners, preInPacketListeners, RemoveAllOperations, RemoveOperation, ReplaceOperation, SetBorder, SetReDraw
 
Fields inherited from class amber.server.component.ComponentHandler
actionCommand, active, ApplicationId, CancelReturn, dataEncoder, DefaultTimeout, enabledState, encoderBytes, id, InvalidId, MaximumId, NoReturn, OkCancelType, OkReturn, OkType, OkYesReturn, parentPage, responsePackets, timeoutValue, UnchangeableInvalidId, visibleState, YesNoCancelType, YesNoType, YesReturn
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface amber.server.panel.ContainerHandler
AddComponent, AutoDoLayout, ForceDoLayout, GetInsets, GetInsetsResponse, NextAvailableCommand, RemoveAllComponents, RemoveComponent, SetBounds
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
TextInputDialog()
          Default constructor.
TextInputDialog(ApplicationInterface appHandler)
          The initialising constructor.
TextInputDialog(ApplicationInterface appHandler, java.lang.String title)
          The initialising constructor.
TextInputDialog(ApplicationInterface appHandler, java.lang.String title, java.lang.String caption)
          The initialising constructor.
TextInputDialog(int id, ApplicationInterface appHandler, java.lang.String title, java.lang.String caption)
          The initialising constructor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
protected  void defineComponents()
          This function is called to define the components which are a part of this template.
 void fillControls()
          This function should be called at the end of recreatePanel.
 java.lang.String getCaption()
          Gets the caption of this dialog.
 java.lang.String getText()
          Returns the text in the edit control.
 void setCaption(java.lang.String caption)
          Sets the caption of this dialog.
 void setText(java.lang.String text)
          Sets the text of the text field in the entry dialog.
 void windowActivated(ComponentWindowEvent e)
          This is called when a window is activated.
 void windowClosed(ComponentWindowEvent e)
          This is called when a window has been closed.
 void windowClosing(ComponentWindowEvent e)
          This is called when the window is in the process of being closed.
 void windowDeactivated(ComponentWindowEvent e)
          This is called when a window is de-activated.
 void windowDeiconified(ComponentWindowEvent e)
          This is called when a window is de-iconified.
 void windowIconified(ComponentWindowEvent e)
          This is called when a window is iconified.
 void windowOpened(ComponentWindowEvent e)
          This function is invoked when a window has been opened.
 
Methods inherited from class amber.server.panel.ModalBaseFrame
canClose, saveData, show
 
Methods inherited from class amber.server.panel.BaseFrame
getPanelType, getTitle, isVisible, setActive, setBounds, setBounds, setInternalBounds, setInternalBounds, setInternalLocation, setInternalLocation, setInternalSize, setInternalSize, setLocation, setLocation, setSize, setSize, setTitle, setVisible, toBack, toFront
 
Methods inherited from class amber.server.panel.BasePanel
add, addComponent, addInPostPacketListener, addInPrePacketListener, buildComponent, buildComponent, doPanelLayout, fireInPostPacketPerformed, fireInPrePacketPerformed, forwardPacket, getAutoDoLayout, getComponents, getComponentStructure, getInsets, getPanelComponent, getPanelComponentAt, getPanelComponentAt, getPanelComponentAt, getPanelComponentAt, getPanelGroup, isMyId, isSelected, matchComponentToControl, matchIdToControl, processCurrentPacket, recreatePanel, remove, removeComponent, removeInPostPacketListener, removeInPrePacketListener, setAutoDoLayout, setBounds, setBounds, setComponentBaseOffset, setLocation, setLocation, setPanelGroup, setPanelLocation, setPanelLocation, setSelected, setSelectedInternal, setSize, setSize, setUpComponent
 
Methods inherited from class amber.server.component.PanelHandler
addComponent, addComponent, addDraw3DRect, addDrawArc, addDrawImage, addDrawImage, addDrawLine, addDrawOval, addDrawPolygon, addDrawPolyline, addDrawRect, addDrawRoundRect, addDrawString, addDrawString, addFill3DRect, addFillArc, addFillOval, addFillPolygon, addFillRect, addFillRoundRect, addOperation, addSetClip, addSetColour, addSetFont, addSetPaintMode, addSetXORMode, getDrawOperations, handleToIndex, insertDraw3DRect, insertDrawArc, insertDrawImage, insertDrawImage, insertDrawLine, insertDrawPolygon, insertDrawPolyline, insertDrawRect, insertDrawRoundRect, insertDrawString, insertDrawString, insertFill3DRect, insertFill3DRect, insertFillArc, insertFillOval, insertFillPolygon, insertFillRect, insertFillRoundRect, insertOperation, insertSetClip, insertSetColour, insertSetFont, insertSetPaintMode, insertSetXORMode, performSetBounds, performSetLocation, performSetSize, removeAllComponents, removeAllDrawOperations, removeDrawOperation, repaintPanel, replaceDraw3DRect, replaceDrawArc, replaceDrawImage, replaceDrawImage, replaceDrawLine, replaceDrawPolygon, replaceDrawPolyline, replaceDrawRect, replaceDrawRoundRect, replaceDrawString, replaceDrawString, replaceFill3DRect, replaceFill3DRect, replaceFillArc, replaceFillOval, replaceFillPolygon, replaceFillRect, replaceFillRoundRect, replaceOperation, replaceSetClip, replaceSetColour, replaceSetFont, replaceSetPaintMode, replaceSetXORMode, resetState, setAutoRepaint, setBorder
 
Methods inherited from class amber.server.component.ComponentHandler
addActionListener, addComponentListener, addEventMask, addFocusListener, addItemListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addReceivedPacket, addTextListener, addWindowListener, booleanToInt, createDataInput, directPacket, displayMessageBox, fireWindowActivated, fireWindowClosed, fireWindowClosing, fireWindowDeactivated, fireWindowDeiconified, fireWindowEvent, fireWindowIconified, fireWindowOpened, forceComponentGetUrl, forceComponentGetUrl, forwardEventPacket, generateActionEvent, generateFocusEvent, generateItemEvent, generateKeyEvent, generateMouseEvent, getActionCommand, getBounds, getDefaultParameters, getEventMask, getFontCharacteristics, getFontCharacteristics, getFontCharacteristics, getFontCharacteristics, getFontStyle, getId, getLocation, getLog, getModalObject, getParentApplication, getParentContainer, getParentServer, getResponsePacket, getSelectedObjects, getSize, getTimeout, getValidId, getX, getY, handleMessages, handlePacket, internalForwardPacket, internalGetBounds, intToBoolean, isActive, isApplicationActive, isComponentModal, isConnected, isEnabled, processActionEvent, processComponentEvent, processEvent, processFocusEvent, processItemEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processNormalResponse, processTextEvent, queryMessageBox, removeActionListener, removeComponentListener, removeEventMask, removeFocusListener, removeItemListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removeTextListener, removeWindowListener, requestFocus, restart, sendPacket, sendPacketAndBlock, sendPendingPackets, setActionCommand, setBackground, setComponentModal, setConnectedState, setCursor, setEnabled, setEventMask, setFont, setFont, setFontStyle, setForeground, setForegroundBackground, setId, setLog, setModalObject, setParentApplication, setParentContainer, setParentServer, setTimeout, setX, setY, shutDown, shutDownClient, shutDownClient, start
 
Methods inherited from class java.awt.Component
action, add, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getToolkit, getTreeLock, getWidth, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, remove, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, reshape, resize, resize, setComponentOrientation, setDropTarget, setLocale, setName, show, size, toString, transferFocus, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TextInputDialogTimeout

public static final long TextInputDialogTimeout
This constant defines how long the dialog will wait for the remote user. In this case 1,000 seconds

BaseWidth

public static final int BaseWidth
The starting width of this dialog.

BaseHeight

public static final int BaseHeight
The starting height of this dialog.

DefaultTitle

public static final java.lang.String DefaultTitle
This is the default title for the dialog.

DefaultCaption

public static final java.lang.String DefaultCaption
This is the default caption for the dialog.
Constructor Detail

TextInputDialog

public TextInputDialog()
Default constructor.

TextInputDialog

public TextInputDialog(ApplicationInterface appHandler)
The initialising constructor.
Parameters:
appHandler - The handle to the main ApplicationInterface which handles the functions of page overall.

TextInputDialog

public TextInputDialog(ApplicationInterface appHandler,
                       java.lang.String title)
The initialising constructor.
Parameters:
appHandler - The handle to the main ApplicationInterface which handles the functions of page overall.
title - String title of the window.

TextInputDialog

public TextInputDialog(ApplicationInterface appHandler,
                       java.lang.String title,
                       java.lang.String caption)
The initialising constructor.
Parameters:
appHandler - The handle to the main ApplicationInterface which handles the functions of page overall.
title - String title of the window.
caption - String containing the caption to display above the text entry field.

TextInputDialog

public TextInputDialog(int id,
                       ApplicationInterface appHandler,
                       java.lang.String title,
                       java.lang.String caption)
The initialising constructor.
Parameters:
id - The ID of the corresponding remote frame control.
appHandler - The handle to the main ApplicationInterface which handles the functions of page overall.
title - String title of the window.
caption - String containing the caption to display above the text entry field.
Method Detail

fillControls

public void fillControls()
This function should be called at the end of recreatePanel. Its specific purpose is to set the controls to a known state once they are created.
Overrides:
fillControls in class ModalBaseFrame
Following copied from interface: amber.server.panel.ContainerHandler
See Also:
BasePanel.defineComponents()

defineComponents

protected void defineComponents()
This function is called to define the components which are a part of this template. This function is called by the constructor to set up the normal static components and their location.
Overrides:
defineComponents in class ModalBaseFrame

getText

public java.lang.String getText()
                         throws ComponentHandlerException
Returns the text in the edit control.
Returns:
String containing the text in the edit control.
Throws:
ComponentHandlerException - with messaging errors.

setText

public void setText(java.lang.String text)
             throws ComponentHandlerException
Sets the text of the text field in the entry dialog.
Parameters:
text - String containing the text to set the text field to.
Throws:
ComponentHandlerException - with messaging errors.

getCaption

public java.lang.String getCaption()
Gets the caption of this dialog.
Returns:
String containing the caption of this dialog.

setCaption

public void setCaption(java.lang.String caption)
                throws ComponentHandlerException
Sets the caption of this dialog.
Parameters:
caption - String containing the caption of this dialog.
Throws:
ComponentHandlerException - with messaging errors.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

windowOpened

public void windowOpened(ComponentWindowEvent e)
Description copied from interface: ComponentWindowListener
This function is invoked when a window has been opened.
Specified by:
windowOpened in interface ComponentWindowListener
Following copied from interface: amber.awt.event.ComponentWindowListener
Parameters:
e - ComponentWindowEvent which contains information on what happened.

windowClosing

public void windowClosing(ComponentWindowEvent e)
Description copied from interface: ComponentWindowListener
This is called when the window is in the process of being closed.
Specified by:
windowClosing in interface ComponentWindowListener
Following copied from interface: amber.awt.event.ComponentWindowListener
Parameters:
e - ComponentWindowEvent which contains information on what happened.

windowClosed

public void windowClosed(ComponentWindowEvent e)
Description copied from interface: ComponentWindowListener
This is called when a window has been closed.
Specified by:
windowClosed in interface ComponentWindowListener
Following copied from interface: amber.awt.event.ComponentWindowListener
Parameters:
e - ComponentWindowEvent which contains information on what happened.

windowIconified

public void windowIconified(ComponentWindowEvent e)
Description copied from interface: ComponentWindowListener
This is called when a window is iconified.
Specified by:
windowIconified in interface ComponentWindowListener
Following copied from interface: amber.awt.event.ComponentWindowListener
Parameters:
e - ComponentWindowEvent which contains information on what happened.

windowDeiconified

public void windowDeiconified(ComponentWindowEvent e)
Description copied from interface: ComponentWindowListener
This is called when a window is de-iconified.
Specified by:
windowDeiconified in interface ComponentWindowListener
Following copied from interface: amber.awt.event.ComponentWindowListener
Parameters:
e - ComponentWindowEvent which contains information on what happened.

windowActivated

public void windowActivated(ComponentWindowEvent e)
Description copied from interface: ComponentWindowListener
This is called when a window is activated.
Specified by:
windowActivated in interface ComponentWindowListener
Following copied from interface: amber.awt.event.ComponentWindowListener
Parameters:
e - ComponentWindowEvent which contains information on what happened.

windowDeactivated

public void windowDeactivated(ComponentWindowEvent e)
Description copied from interface: ComponentWindowListener
This is called when a window is de-activated.
Specified by:
windowDeactivated in interface ComponentWindowListener
Following copied from interface: amber.awt.event.ComponentWindowListener
Parameters:
e - ComponentWindowEvent which contains information on what happened.


Copyright © 2002 Clearfield Research Ltd. All Rights Reserved.