|
||||||||||
| 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.SqlViewer
public class SqlViewer
Represents a little tool for querying SQL databases.
| 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 |
HEIGHT
the height property in the history file. |
static String |
WIDTH
the width property in the history file. |
| 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, PROPERTIES, SOMEBITS |
| Constructor Summary | |
|---|---|
SqlViewer(JFrame parent)
initializes the SqlViewer. |
|
| Method Summary | |
|---|---|
void |
addConnectionListener(ConnectionListener l)
adds the given listener to the list of listeners. |
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 |
addResultChangedListener(ResultChangedListener l)
adds the given listener to the list of listeners. |
void |
clear()
calls the clear method of all sub-panels to set back to default values and free up memory. |
void |
connectionChange(ConnectionEvent evt)
This method gets called when the connection is either established or disconnected. |
String |
getPassword()
returns the password from the currently active tab in the ResultPanel, otherwise an empty string. |
String |
getQuery()
returns the query from the currently active tab in the ResultPanel, otherwise an empty string. |
String |
getURL()
returns the database URL from the currently active tab in the ResultPanel, otherwise an empty string. |
String |
getUser()
returns the user from the currently active tab in the ResultPanel, otherwise an empty string. |
void |
historyChanged(HistoryChangedEvent evt)
This method gets called when a history is modified. |
static void |
main(String[] args)
starts the SQL-Viewer interface. |
void |
queryExecuted(QueryExecuteEvent evt)
This method gets called when a query has been executed. |
void |
removeConnectionListener(ConnectionListener l)
removes the given listener from the list of listeners. |
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 |
removeResultChangedListener(ResultChangedListener l)
removes the given listener from the list of listeners. |
void |
resultChanged(ResultChangedEvent evt)
This method gets called when a query has been executed. |
void |
saveSize()
obtains the size of the panel and saves it in the 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 WIDTH
public static final String HEIGHT
| Constructor Detail |
|---|
public SqlViewer(JFrame parent)
parent - the parent of this panel| Method Detail |
|---|
public void connectionChange(ConnectionEvent evt)
connectionChange in interface ConnectionListenerevt - the eventpublic void queryExecuted(QueryExecuteEvent evt)
queryExecuted in interface QueryExecuteListenerevt - the eventpublic void resultChanged(ResultChangedEvent evt)
resultChanged in interface ResultChangedListenerevt - the eventpublic void historyChanged(HistoryChangedEvent evt)
historyChanged in interface HistoryChangedListenerevt - the eventpublic void saveSize()
saveHistory()public void clear()
public String getURL()
ResultPanelpublic String getUser()
ResultPanelpublic String getPassword()
ResultPanelpublic String getQuery()
ResultPanelpublic void addConnectionListener(ConnectionListener l)
l - the listener to add to the listpublic void removeConnectionListener(ConnectionListener l)
l - the listener to removepublic void addQueryExecuteListener(QueryExecuteListener l)
l - the listener to add to the listpublic void removeQueryExecuteListener(QueryExecuteListener l)
l - the listener to removepublic void addResultChangedListener(ResultChangedListener l)
l - the listener to add to the listpublic void removeResultChangedListener(ResultChangedListener 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 static void main(String[] args)
args - the commandline arguments - ignored
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||