org.eclipse.rse.ui.widgets
Class SystemPortPrompt
java.lang.Object
org.eclipse.rse.ui.widgets.SystemPortPrompt
-
All Implemented Interfaces:
-
EventListener,
SelectionListener,
org.eclipse.swt.internal.SWTEventListener
-
public class SystemPortPrompt
- extends
Object
- implements
SelectionListener
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.
Constructor Summary
|
SystemPortPrompt
(
Composite parent,
int style,
ISystemMessageLine msgLine,
boolean wantLabel,
boolean isPortEditable,
int 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,
int existingPortValue,
ISystemValidator portValidator)
Constructor when you have an existing composite to hold the child controls |
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
errorMessage
protected
SystemMessage errorMessage
portEditable
protected boolean portEditable
portApplicable
protected boolean portApplicable
existingPortValue
protected int existingPortValue
portValidator
protected
ISystemValidator portValidator
msgLine
protected
ISystemMessageLine msgLine
SystemPortPrompt
public SystemPortPrompt(
Composite parent,
int style,
ISystemMessageLine msgLine,
boolean wantLabel,
boolean isPortEditable,
int 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,
int existingPortValue,
ISystemValidator portValidator)
- Constructor when you have an existing composite to hold the child controls
getPort
public int 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(int 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,
int 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)
-
-
Specified by:
-
widgetDefaultSelected
in interface
SelectionListener
-
widgetSelected
public void widgetSelected(
SelectionEvent event)
-
-
Specified by:
-
widgetSelected
in interface
SelectionListener
-
Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.