|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--kiwi.ui.KPanel | +--kiwi.ui.SimpleEditor
A simple text editor for entering unformatted text. The editor consists of
a scrollable JTextArea
and Cut, Copy, and
Paste buttons.
SimpleStyledEditor
, Serialized FormInner classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Field Summary | |
protected JTextArea |
t_text
The JTextArea that holds the text for this component. |
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 |
Constructor Summary | |
SimpleEditor()
Construct a new SimpleEditor . |
|
SimpleEditor(int rows,
int columns)
Construct a new SimpleEditor with the specified number of
rows and colunns. |
Method Summary | |
void |
addButton(KButton button)
Add a button to the editor's tool bar. |
void |
copy()
Perform a copy operation on the editor. |
void |
cut()
Perform a cut operation on the editor. |
JTextArea |
getJTextArea()
Get the JTextArea used by this SimpleEditor . |
String |
getText()
Get the text in the editor. |
void |
insertText(String text)
Insert text into the editor, replacing the current selection (if any). |
void |
paste()
Perform a paste operation on the editor. |
void |
requestFocus()
Request focus for the editor. |
void |
setEditable(boolean flag)
Set the editable state of the editor. |
void |
setText(String text)
Set the text in the editor. |
Methods inherited from class kiwi.ui.KPanel |
getComponentByName,
paintComponent,
setOpaque,
setTexture |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext,
getUIClassID,
paramString,
updateUI |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getLayout,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
preferredSize,
print,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
setLayout,
validate,
validateTree |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected JTextArea t_text
JTextArea
that holds the text for this component.Constructor Detail |
public SimpleEditor()
SimpleEditor
. The editor is created with
a default JTextArea
size of 10 rows by 60 columns.public SimpleEditor(int rows, int columns)
SimpleEditor
with the specified number of
rows and colunns.row
- The number of rows for the JTextArea
.columns
- The number of columns for the JTextArea
.Method Detail |
public void requestFocus()
public JTextArea getJTextArea()
JTextArea
used by this SimpleEditor
.JTextArea
for this editor.public void insertText(String text)
text
- The text to insert.public void setEditable(boolean flag)
flag
- If true, the editor will be editable, otherwise it
will be non-editable.public void setText(String text)
text
- The text to display in the editor.public String getText()
public void cut()
public void copy()
public void paste()
public void addButton(KButton button)
ActionListener
for the button.button
- The button to add.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |