|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.text.JTextComponent
javax.swing.JTextField
org.compiere.swing.CTextField
public class CTextField
Compiere Text Field
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JTextField |
|---|
JTextField.AccessibleJTextField |
| Nested classes/interfaces inherited from class javax.swing.text.JTextComponent |
|---|
JTextComponent.AccessibleJTextComponent, JTextComponent.DropLocation, JTextComponent.KeyBinding |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JTextField |
|---|
notifyAction |
| Fields inherited from class javax.swing.text.JTextComponent |
|---|
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
CTextField()
Constructs a new TextField. |
|
CTextField(Document doc,
String text,
int columns)
Constructs a new JTextField that uses the given text
storage model and the given number of columns. |
|
CTextField(int columns)
Constructs a new empty TextField with the specified
number of columns. |
|
CTextField(String text)
Constructs a new TextField initialized with the
specified text. |
|
CTextField(String text,
int columns)
Constructs a new TextField initialized with the
specified text and columns. |
|
| Method Summary | |
|---|---|
String |
getDisplay()
Return Display Value |
Object |
getValue()
Return Editor value |
boolean |
isMandatory()
Is Field mandatory |
boolean |
isReadWrite()
Is it possible to edit |
void |
keyPressed(KeyEvent e)
key Pressed |
void |
keyReleased(KeyEvent e)
key Released |
void |
keyTyped(KeyEvent e)
key Typed |
void |
setBackground(boolean error)
Set Background based on editable / mandatory / error |
void |
setBackground(Color bg)
Set Background |
void |
setMandatory(boolean mandatory)
Set Editor Mandatory |
void |
setReadWrite(boolean rw)
Enable Editor |
void |
setValue(Object value)
Set Editor to value |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.compiere.swing.CEditor |
|---|
setVisible |
| Constructor Detail |
|---|
public CTextField()
TextField. A default model is created,
the initial string is null,
and the number of columns is set to 0.
public CTextField(String text)
TextField initialized with the
specified text. A default model is created and the number of
columns is 0.
text - the text to be displayed, or nullpublic CTextField(int columns)
TextField with the specified
number of columns.
A default model is created and the initial string is set to
null.
columns - the number of columns to use to calculate
the preferred width; if columns is set to zero, the
preferred width will be whatever naturally results from
the component implementation
public CTextField(String text,
int columns)
TextField initialized with the
specified text and columns. A default model is created.
text - the text to be displayed, or nullcolumns - the number of columns to use to calculate
the preferred width; if columns is set to zero, the
preferred width will be whatever naturally results from
the component implementation
public CTextField(Document doc,
String text,
int columns)
JTextField that uses the given text
storage model and the given number of columns.
This is the constructor through which the other constructors feed.
If the document is null, a default model is created.
doc - the text storage to use; if this is null,
a default will be provided by calling the
createDefaultModel methodtext - the initial string to display, or nullcolumns - the number of columns to use to calculate
the preferred width >= 0; if columns
is set to zero, the preferred width will be whatever
naturally results from the component implementation
IllegalArgumentException - if columns < 0| Method Detail |
|---|
public void setMandatory(boolean mandatory)
setMandatory in interface CEditormandatory - true, if you have to enter datapublic boolean isMandatory()
isMandatory in interface CEditorpublic void setReadWrite(boolean rw)
setReadWrite in interface CEditorrw - true, if you can enter/select datapublic boolean isReadWrite()
isReadWrite in interface CEditorpublic void setBackground(boolean error)
setBackground in interface CEditorerror - if true, set background to error color, otherwise mandatory/editablepublic void setBackground(Color bg)
setBackground in class JComponentbg - backgroundpublic void setValue(Object value)
setValue in interface CEditorvalue - value of the editorpublic Object getValue()
getValue in interface CEditorpublic String getDisplay()
getDisplay in interface CEditorpublic void keyPressed(KeyEvent e)
keyPressed in interface KeyListenere - KeyListener.keyPressed(java.awt.event.KeyEvent)public void keyReleased(KeyEvent e)
keyReleased in interface KeyListenere - KeyListener.keyReleased(java.awt.event.KeyEvent)public void keyTyped(KeyEvent e)
keyTyped in interface KeyListenere - KeyListener.keyTyped(java.awt.event.KeyEvent)
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||