|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.joctopus.ui.console.JOctopusConsole
public class JOctopusConsole
This class is a chatter console. A window for writing debug output.Its is multithreaded for operating asynchronously.
Field Summary | |
---|---|
static int |
DISPOSE_ON_CLOSE
The dispose-window default window close operation. |
static int |
DO_NOTHING_ON_CLOSE
The do-nothing default window close operation. |
static int |
EXIT_ON_CLOSE
The exit application default window close operation. |
static int |
HIDE_ON_CLOSE
The hide-window default window close operation |
Constructor Summary | |
---|---|
JOctopusConsole()
Default constructor for initializing UI itself in constructor. |
|
JOctopusConsole(int mode)
|
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
clearConsole()
clears the consoles text. |
void |
createAndShowGUI()
starts the console thread |
javax.swing.JButton |
getBtnClear()
|
javax.swing.JButton |
getBtnSave()
|
java.awt.Font |
getFontBtn()
|
java.awt.Font |
getFontConsole()
|
javax.swing.JFrame |
getFrmConsole()
|
javax.swing.JScrollPane |
getPaneConsole()
|
javax.swing.JTextArea |
getTxtConsole()
|
void |
hideConsole()
hides the console |
void |
print(java.lang.Object obj)
Writes output to console, similar to System.out.print the method is synchronized, to avoid multiple thread access at same time |
void |
println(java.lang.Object obj)
Writes output to console, similar to System.out.println, and the method is synchronized, to avoid multiple thread access at same time |
void |
run()
|
void |
scrollToEnd()
scrolls the consoles scrollbar to end, by setting the caret position to max-length of textareas content |
void |
scrollToPosition(int position)
scrolls the consoles scrollbar at custom position |
void |
setBtnClear(javax.swing.JButton btnClear)
|
void |
setBtnSave(javax.swing.JButton btnSave)
|
void |
setFontBtn(java.awt.Font fontBtn)
|
void |
setFontConsole(java.awt.Font fontConsole)
|
void |
setFrmConsole(javax.swing.JFrame frmConsole)
|
void |
setPaneConsole(javax.swing.JScrollPane paneConsole)
|
void |
setTxtConsole(javax.swing.JTextArea txtConsole)
|
void |
showConsole()
pop ups the console,i.e makes it visible |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int HIDE_ON_CLOSE
public static int DISPOSE_ON_CLOSE
public static int EXIT_ON_CLOSE
public static int DO_NOTHING_ON_CLOSE
Constructor Detail |
---|
public JOctopusConsole()
public JOctopusConsole(int mode)
mode
- mode of chatter console
can be one of the following
HIDE_ON_CLOSE,
DISPOSE_ON_CLOSE,
EXIT_ON_CLOSE,
DO_NOTHING_ON_CLOSEMethod Detail |
---|
public javax.swing.JButton getBtnClear()
public void setBtnClear(javax.swing.JButton btnClear)
btnClear
- set Clear buttonpublic javax.swing.JButton getBtnSave()
public void setBtnSave(javax.swing.JButton btnSave)
btnSave
- SAVE buttonpublic java.awt.Font getFontBtn()
public void setFontBtn(java.awt.Font fontBtn)
fontBtn
- Font for buttons(SAVE and CLEAR).public java.awt.Font getFontConsole()
public void setFontConsole(java.awt.Font fontConsole)
fontConsole
- set console's font, where output is written.Inshort JTextAreas font.public javax.swing.JFrame getFrmConsole()
public void setFrmConsole(javax.swing.JFrame frmConsole)
frmConsole
- console frame.public javax.swing.JScrollPane getPaneConsole()
public void setPaneConsole(javax.swing.JScrollPane paneConsole)
paneConsole
- Console's JScrollPanepublic javax.swing.JTextArea getTxtConsole()
public void setTxtConsole(javax.swing.JTextArea txtConsole)
txtConsole
- set console area for writing debug output.public void println(java.lang.Object obj)
obj
- public void print(java.lang.Object obj)
obj
- public void clearConsole()
public void showConsole()
public void hideConsole()
public void scrollToEnd()
public void scrollToPosition(int position)
position
- public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void run()
run
in interface java.lang.Runnable
public void createAndShowGUI()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |