|
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.JScrollPane
org.compiere.swing.CTextArea
public class CTextArea
Compiere TextArea - A ScrollPane with a JTextArea. Manages visibility, opaque and color consistently
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JScrollPane |
|---|
JScrollPane.AccessibleJScrollPane, JScrollPane.ScrollBar |
| 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.JScrollPane |
|---|
columnHeader, horizontalScrollBar, horizontalScrollBarPolicy, lowerLeft, lowerRight, rowHeader, upperLeft, upperRight, verticalScrollBar, verticalScrollBarPolicy, viewport |
| 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 java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
CTextArea()
Constructs a new TextArea. |
|
CTextArea(Document doc)
Constructs a new JTextArea with the given document model, and defaults for all of the other arguments (null, 0, 0). |
|
CTextArea(Document doc,
String text,
int rows,
int columns)
Constructs a new JTextArea with the specified number of rows and columns, and the given model. |
|
CTextArea(int rows,
int columns)
Constructs a new empty TextArea with the specified number of rows and columns. |
|
CTextArea(JTextArea textArea)
Create a JScrollArea with a JTextArea. |
|
CTextArea(String text)
Constructs a new TextArea with the specified text displayed. |
|
CTextArea(String text,
int rows,
int columns)
Constructs a new TextArea with the specified text and number of rows and columns. |
|
| Method Summary | |
|---|---|
void |
addFocusListener(FocusListener l)
AddFocusListener |
void |
addInputMethodListener(InputMethodListener l)
Add Text Input Method Listener |
void |
addKeyListener(KeyListener l)
Add Text Key Listener |
void |
addMouseListener(MouseListener l)
Add Text Mouse Listener |
void |
addText(String text)
Add Text (in New Line) |
void |
append(String text)
Append text |
void |
focusGained(FocusEvent fe)
Focus Listener - Gained |
void |
focusLost(FocusEvent fe)
Focus Listener - Lost |
Color |
getBackground()
Get Background color |
int |
getCaretPosition()
Get Text Caret Position |
int |
getColumns()
Get Columns |
String |
getDisplay()
Return Display Value |
Component |
getFocusableComponent()
Get Focus Component |
Color |
getForeground()
Get Foreground color |
InputMethodRequests |
getInputMethodRequests()
Get text Input Method Requests |
int |
getRows()
Get Rows |
String |
getText()
Get Text |
JTextArea |
getTextArea()
|
Object |
getValue()
Return Editor value |
void |
initPublish()
Initialize Publishing |
boolean |
isEditable()
Is Text Editable |
boolean |
isMandatory()
Is Field mandatory |
boolean |
isReadWrite()
Is it possible to edit |
void |
publish(Level level,
String info,
int step,
int totalSteps)
Publish Information to User. |
void |
requestFocus()
Request Focus |
boolean |
requestFocusInWindow()
Request Focus In Window |
void |
setBackground(boolean error)
Set Background based on editable / mandatory / error |
void |
setBackground(Color color)
Set Background color |
void |
setCaretPosition(int pos)
Set Text Caret Position |
void |
setColumns(int cols)
Set Columns |
void |
setEditable(boolean edit)
Set Text Editable |
void |
setForeground(Color color)
Set Foreground color |
void |
setInputVerifier(InputVerifier l)
Set Text Input Verifier |
void |
setLineWrap(boolean wrap)
Set Text Line Wrap |
void |
setMandatory(boolean mandatory)
Set Editor Mandatory |
void |
setMargin(Insets m)
Set Text Margin |
void |
setOpaque(boolean isOpaque)
Set Opaque |
void |
setReadWrite(boolean rw)
Enable Editor |
void |
setRows(int rows)
Set Rows |
void |
setText(String text)
Set Text and position top |
void |
setValue(Object value)
Set Editor to value |
void |
setWrapStyleWord(boolean word)
Set Text Wrap Style Word |
| 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 CTextArea()
public CTextArea(String text)
text - the text to be displayed, or null
public CTextArea(int rows,
int columns)
rows - the number of rows >= 0columns - the number of columns >= 0
IllegalArgumentException - if the rows or columns
arguments are negative.
public CTextArea(String text,
int rows,
int columns)
text - the text to be displayed, or nullrows - the number of rows >= 0columns - the number of columns >= 0
IllegalArgumentException - if the rows or columns
arguments are negative.public CTextArea(Document doc)
doc - the model to use
public CTextArea(Document doc,
String text,
int rows,
int columns)
doc - the model to use, or create a default one if nulltext - the text to be displayed, null if nonerows - the number of rows >= 0columns - the number of columns >= 0
IllegalArgumentException - if the rows or columns
arguments are negative.public CTextArea(JTextArea textArea)
textArea - | 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 color)
setBackground in class JComponentcolor - colorpublic Color getBackground()
getBackground in class Componentpublic void setForeground(Color color)
setForeground in class JComponentcolor - public Color getForeground()
getForeground in class Componentpublic 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 setText(String text)
text - public String getText()
public void append(String text)
text - public void addText(String text)
text - text to be addedpublic void setColumns(int cols)
cols - public int getColumns()
public void setRows(int rows)
rows - public int getRows()
public void setCaretPosition(int pos)
pos - public int getCaretPosition()
public void setEditable(boolean edit)
edit - public boolean isEditable()
public void setLineWrap(boolean wrap)
wrap - public void setWrapStyleWord(boolean word)
word - public void setOpaque(boolean isOpaque)
setOpaque in class JComponentisOpaque - public void setMargin(Insets m)
m - insetspublic void addFocusListener(FocusListener l)
addFocusListener in class Componentl - public void addMouseListener(MouseListener l)
addMouseListener in class Componentl - public void addKeyListener(KeyListener l)
addKeyListener in class Componentl - public void addInputMethodListener(InputMethodListener l)
addInputMethodListener in class Componentl - public InputMethodRequests getInputMethodRequests()
getInputMethodRequests in class Componentpublic void setInputVerifier(InputVerifier l)
setInputVerifier in class JComponentl - public void requestFocus()
requestFocus in class JComponentpublic boolean requestFocusInWindow()
requestFocusInWindow in class JComponentpublic Component getFocusableComponent()
public void initPublish()
initPublish in interface PublishInterface
public void publish(Level level,
String info,
int step,
int totalSteps)
publish in interface PublishInterfacelevel - type/importance - use INFO for main task - Create Database --
CONFIG for areas - (not used for this example) --- FINE for the
actual work - Drop User ---- FINER for trace - database feedback *
WARNING if we can continue * SEVERE if we need to abort the
processinfo - the clear text infostep - the step you are ontotalSteps - the total number of steps for this taskpublic void focusGained(FocusEvent fe)
focusGained in interface FocusListenerfe - eventpublic void focusLost(FocusEvent fe)
focusLost in interface FocusListenerfe - eventpublic JTextArea getTextArea()
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||