Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.ui.widgets
Class SystemPortPrompt


java.lang.Object
  extended by 
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.


Field Summary
protected   SystemMessage errorMessage
           
protected  int existingPortValue
           
protected   ISystemMessageLine msgLine
           
protected  boolean portApplicable
           
protected  boolean portEditable
           
protected   ISystemValidator portValidator
           
 
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
 
Method Summary
protected  void clearErrorMessage ()
           
protected  void createPortPrompt ( Composite composite_prompts, boolean wantLabel)
          Create GUI widgets
 int 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, int 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 (int 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

errorMessage

protected 
SystemMessage errorMessage

portEditable

protected boolean portEditable

portApplicable

protected boolean portApplicable

existingPortValue

protected int existingPortValue

portValidator

protected 
ISystemValidator portValidator

msgLine

protected 
ISystemMessageLine msgLine
Constructor Detail

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

Method Detail

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

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire