Remote Systems
v6.4.1

com.ibm.etools.systems.core.ui.widgets
Class SystemPortPrompt

java.lang.Object
  extended bycom.ibm.etools.systems.core.ui.widgets.SystemPortPrompt

public class SystemPortPrompt
extends Object

A composite encapsulating the GUI widgets for prompting for a port. Used in the core SubSystem property page but also be instantiated and used anywhere.


Field Summary
static String copyright
           
protected  SystemMessage errorMessage
           
protected  Integer existingPortValue
           
protected  ISystemMessageLine msgLine
           
protected  boolean portApplicable
           
protected  boolean portEditable
           
protected  ISystemValidator portValidator
           
protected  ResourceBundle rb
           
 
Constructor Summary
SystemPortPrompt(Composite parent, int style, ISystemMessageLine msgLine, boolean wantLabel, boolean isPortEditable, Integer existingPortValue, ISystemValidator portValidator)
          Constructor when you want a new composite to hold the child controls
SystemPortPrompt(Composite composite_prompts, ISystemMessageLine msgLine, boolean wantLabel, boolean isPortEditable, Integer existingPortValue, ISystemValidator portValidator)
          Constructor when you have an existing composite to hold the child controls
 
Method Summary
protected  void clearErrorMessage()
           
protected  void createPortPrompt(Composite composite_prompts, boolean wantLabel)
          Create GUI widgets
 Integer getPort()
          Get user-entered Port number.
 Control getPortField()
          Return the entry field or label for the port prompt
 String getPortString()
          Return user-enter Port number as a string
protected  void init(Composite composite_prompts, ISystemMessageLine msgLine, boolean wantLabel, boolean isPortEditable, Integer existingPortValue, ISystemValidator portValidator)
          Initialize vars, create and init prompts
protected  String internalGetPort()
          Return user-entered Port number.
 boolean isComplete()
          Return true if current port value is without error
 boolean isEditable()
          Return true if port is user-editable
protected  boolean isPortApplicable()
          Return true if the port is applicable.
protected  boolean isPortEditable()
          Return true if the port is editable for this subsystem
 void setDefault()
          Reset to original value
protected  void setErrorMessage(SystemMessage msg)
           
 boolean setFocus()
          Set the focus
 void setPort(Integer port)
          Set the initial port value
 SystemMessage validatePortInput()
          Validate port value per keystroke
 void widgetDefaultSelected(SelectionEvent event)
           
 void widgetSelected(SelectionEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values

errorMessage

protected SystemMessage errorMessage

rb

protected ResourceBundle rb

portEditable

protected boolean portEditable

portApplicable

protected boolean portApplicable

existingPortValue

protected Integer existingPortValue

portValidator

protected ISystemValidator portValidator

msgLine

protected ISystemMessageLine msgLine
Constructor Detail

SystemPortPrompt

public SystemPortPrompt(Composite parent,
                        int style,
                        ISystemMessageLine msgLine,
                        boolean wantLabel,
                        boolean isPortEditable,
                        Integer existingPortValue,
                        ISystemValidator portValidator)
Constructor when you want a new composite to hold the child controls


SystemPortPrompt

public SystemPortPrompt(Composite composite_prompts,
                        ISystemMessageLine msgLine,
                        boolean wantLabel,
                        boolean isPortEditable,
                        Integer existingPortValue,
                        ISystemValidator portValidator)
Constructor when you have an existing composite to hold the child controls

Method Detail

getPort

public Integer getPort()
Get user-entered Port number.


getPortString

public String getPortString()
Return user-enter Port number as a string


isEditable

public boolean isEditable()
Return true if port is user-editable


isComplete

public boolean isComplete()
Return true if current port value is without error


setPort

public void setPort(Integer port)
Set the initial port value


setFocus

public boolean setFocus()
Set the focus


setDefault

public void setDefault()
Reset to original value


getPortField

public Control getPortField()
Return the entry field or label for the port prompt


validatePortInput

public SystemMessage validatePortInput()
Validate port value per keystroke


init

protected void init(Composite composite_prompts,
                    ISystemMessageLine msgLine,
                    boolean wantLabel,
                    boolean isPortEditable,
                    Integer existingPortValue,
                    ISystemValidator portValidator)
Initialize vars, create and init prompts


internalGetPort

protected String internalGetPort()
Return user-entered Port number.


createPortPrompt

protected void createPortPrompt(Composite composite_prompts,
                                boolean wantLabel)
Create GUI widgets


isPortApplicable

protected boolean isPortApplicable()
Return true if the port is applicable. For this to be false, the caller must state the port is not editable, and the port value must be null or Integer(-1).


isPortEditable

protected boolean isPortEditable()
Return true if the port is editable for this subsystem


setErrorMessage

protected void setErrorMessage(SystemMessage msg)

clearErrorMessage

protected void clearErrorMessage()

widgetDefaultSelected

public void widgetDefaultSelected(SelectionEvent event)

widgetSelected

public void widgetSelected(SelectionEvent event)

Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.