|
||||||||||
| 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.JPanel
weka.gui.sql.QueryPanel
public class QueryPanel
Represents a panel for entering an SQL query.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.BaselineResizeBehavior |
| Field Summary | |
|---|---|
static String |
HISTORY_NAME
the name of the history. |
static String |
MAX_ROWS
the name for the max rows in the history. |
| Fields inherited from class javax.swing.JComponent |
|---|
TOOL_TIP_TEXT_KEY, 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 | |
|---|---|
QueryPanel(JFrame parent)
initializes the panel. |
|
| Method Summary | |
|---|---|
void |
addHistoryChangedListener(HistoryChangedListener l)
adds the given listener to the list of listeners. |
void |
addQueryExecuteListener(QueryExecuteListener l)
adds the given listener to the list of listeners. |
void |
caretUpdate(CaretEvent event)
Called when the caret position is updated. |
void |
clear()
clears the textarea. |
void |
connectionChange(ConnectionEvent evt)
This method gets called when the connection is either established or disconnected. |
void |
execute()
executes the current query. |
DefaultListModel |
getHistory()
returns the history. |
int |
getMaxRows()
returns the current value for the maximum number of rows. |
String |
getQuery()
returns the currently displayed query. |
void |
removeHistoryChangedListener(HistoryChangedListener l)
removes the given listener from the list of listeners. |
void |
removeQueryExecuteListener(QueryExecuteListener l)
removes the given listener from the list of listeners. |
void |
setFocus()
sets the focus in a designated control. |
void |
setHistory(DefaultListModel history)
sets the local history to the given one. |
void |
setMaxRows(int rows)
sets the maximum number of rows to display. |
void |
setQuery(String query)
sets the query in the textarea. |
void |
showHistory()
displays the query history. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String HISTORY_NAME
public static final String MAX_ROWS
| Constructor Detail |
|---|
public QueryPanel(JFrame parent)
parent - the parent of this panel| Method Detail |
|---|
public void setFocus()
public void connectionChange(ConnectionEvent evt)
connectionChange in interface ConnectionListenerevt - the eventpublic void execute()
public void clear()
public void setHistory(DefaultListModel history)
history - the history to usepublic DefaultListModel getHistory()
public void showHistory()
public void setQuery(String query)
query - the query to displaypublic String getQuery()
public void setMaxRows(int rows)
rows - the maximum number of rowspublic int getMaxRows()
public void addQueryExecuteListener(QueryExecuteListener l)
l - the listener to add to the listpublic void removeQueryExecuteListener(QueryExecuteListener l)
l - the listener to removepublic void addHistoryChangedListener(HistoryChangedListener l)
l - the listener to add to the listpublic void removeHistoryChangedListener(HistoryChangedListener l)
l - the listener to removepublic void caretUpdate(CaretEvent event)
caretUpdate in interface CaretListenerevent - the event
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||