Back to index

wims  3.65+svn20090927
Public Member Functions | Protected Attributes | Package Attributes
rene.gui.IntField Class Reference

A TextField, which holds an integer number with minimal and maximal range. More...

Inheritance diagram for rene.gui.IntField:
Inheritance graph
[legend]
Collaboration diagram for rene.gui.IntField:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 IntField (DoActionListener l, String name, int v)
 IntField (DoActionListener l, String name, int v, int cols)
int value ()
int value (int min, int max)
void set (int v)
boolean valid ()
void triggerAction ()
void focusGained (FocusEvent e)
void focusLost (FocusEvent e)
void setText (String s)
String getOldText ()
boolean isChanged ()

Protected Attributes

ActionTranslator T

Package Attributes

String S

Detailed Description

A TextField, which holds an integer number with minimal and maximal range.

Definition at line 9 of file IntField.java.


Constructor & Destructor Documentation

rene.gui.IntField.IntField ( DoActionListener  l,
String  name,
int  v 
) [inline]

Definition at line 10 of file IntField.java.

{      public IntField (DoActionListener l, String name, int v)
       {      super(l,name,""+v);
       }
rene.gui.IntField.IntField ( DoActionListener  l,
String  name,
int  v,
int  cols 
) [inline]

Definition at line 13 of file IntField.java.

       {      super(l,name,""+v,cols);
       }

Member Function Documentation

void rene.gui.TextFieldAction.focusGained ( FocusEvent  e) [inline, inherited]

Definition at line 52 of file TextFieldAction.java.

       {      setSelectionStart(0);
       }

Here is the caller graph for this function:

void rene.gui.TextFieldAction.focusLost ( FocusEvent  e) [inline, inherited]

Definition at line 55 of file TextFieldAction.java.

       {      setSelectionStart(0);
              setSelectionEnd(0);
       }
String rene.gui.TextFieldAction.getOldText ( ) [inline, inherited]

Definition at line 63 of file TextFieldAction.java.

       {      return S;
       }

Definition at line 66 of file TextFieldAction.java.

       {      return !S.equals(getText());
       }

Here is the caller graph for this function:

void rene.gui.IntField.set ( int  v) [inline]

Definition at line 38 of file IntField.java.

       {      setText(""+v);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.gui.TextFieldAction.setText ( String  s) [inline, inherited]

Definition at line 59 of file TextFieldAction.java.

       {      super.setText(s);
              S=s;
       }

Here is the caller graph for this function:

void rene.gui.TextFieldAction.triggerAction ( ) [inline, inherited]

Definition at line 49 of file TextFieldAction.java.

       {      T.trigger();
       }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 41 of file IntField.java.

       {      try
              {      Integer.parseInt(getText());
              }
              catch (NumberFormatException e)
              {      return false;
              }
              return true;
       }
int rene.gui.IntField.value ( ) [inline]

Definition at line 16 of file IntField.java.

       {      try
              {      return Integer.parseInt(getText());
              }
              catch (NumberFormatException e)
              {      setText(""+0);
                     return 0;
              }
       }

Here is the call graph for this function:

Here is the caller graph for this function:

int rene.gui.IntField.value ( int  min,
int  max 
) [inline]

Definition at line 25 of file IntField.java.

       {      int n;
              try
              {      n=Integer.parseInt(getText());
              }
              catch (NumberFormatException e)
              {      setText(""+min);
                     return min;
              }
              if (n<min) { n=min; setText(""+min); }
              if (n>max) { n=max; setText(""+max); }
              return n;
       }

Here is the call graph for this function:


Member Data Documentation

String rene.gui.TextFieldAction.S [package, inherited]

Definition at line 15 of file TextFieldAction.java.

Definition at line 14 of file TextFieldAction.java.


The documentation for this class was generated from the following file: