ca.sqlpower.wabit.swingui.enterprise
Class ServerInfoPanel
java.lang.Object
ca.sqlpower.wabit.swingui.enterprise.ServerInfoPanel
- All Implemented Interfaces:
- ca.sqlpower.swingui.DataEntryPanel
public class ServerInfoPanel
- extends java.lang.Object
- implements ca.sqlpower.swingui.DataEntryPanel
Creates a panel for setting the properties of a WabitServerInfo. Since
instances of WabitServerInfo are not mutable, calling applyChanges() will not
modify the original WabitServerInfo object provided in the constructor. You
must obtain a new WabitServerInfo object by calling getServerInfo().
|
Constructor Summary |
ServerInfoPanel(java.awt.Component dialogOwner,
ca.sqlpower.enterprise.client.SPServerInfo defaultSettings)
|
ServerInfoPanel(javax.swing.JComponent dialogOwner)
|
|
Method Summary |
boolean |
applyChanges()
Checks fields for validity, but does not modify the WabitServerInfo given in
the constructor (this is not possible because it's immutable). |
void |
discardChanges()
|
javax.swing.JComponent |
getPanel()
|
ca.sqlpower.enterprise.client.SPServerInfo |
getServerInfo()
Returns a new WabitServerInfo object which has been configured based on the
settings currently in this panel's fields. |
boolean |
hasUnsavedChanges()
|
static void |
main(java.lang.String[] args)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServerInfoPanel
public ServerInfoPanel(java.awt.Component dialogOwner,
ca.sqlpower.enterprise.client.SPServerInfo defaultSettings)
ServerInfoPanel
public ServerInfoPanel(javax.swing.JComponent dialogOwner)
getServerInfo
public ca.sqlpower.enterprise.client.SPServerInfo getServerInfo()
- Returns a new WabitServerInfo object which has been configured based on the
settings currently in this panel's fields.
getPanel
public javax.swing.JComponent getPanel()
- Specified by:
getPanel in interface ca.sqlpower.swingui.DataEntryPanel
applyChanges
public boolean applyChanges()
- Checks fields for validity, but does not modify the WabitServerInfo given in
the constructor (this is not possible because it's immutable). If any of
the fields contain inappropriate entries, the user will be told so in a
dialog.
- Specified by:
applyChanges in interface ca.sqlpower.swingui.DataEntryPanel
- Returns:
- true if all the fields contain valid values; false if there are
invalid fields.
discardChanges
public void discardChanges()
- Specified by:
discardChanges in interface ca.sqlpower.swingui.DataEntryPanel
hasUnsavedChanges
public boolean hasUnsavedChanges()
- Specified by:
hasUnsavedChanges in interface ca.sqlpower.swingui.DataEntryPanel
main
public static void main(java.lang.String[] args)
Copyright © 2009. All Rights Reserved.