de.soldin.gt2jump.readwrite
Class GT2DatasourceFactoryChooser

java.lang.Object
  extended byorg.swixml.SwingEngine
      extended byde.soldin.gt2jump.readwrite.GT2DatasourceFactoryChooser
All Implemented Interfaces:
ActionListener, EventListener, ItemListener

public class GT2DatasourceFactoryChooser
extends org.swixml.SwingEngine
implements ActionListener, ItemListener

Implements the SwingEngine and is the ui component for choosing a GT2 datasource modul.

The matching file or db parameter panel is shown depending on the choice.


Field Summary
 JTextField database
           
static int DS_DB
           
static int DS_ERROR
           
 JComboBox ds_factorychooser
           
static int DS_FILE
           
 JTextPane errormsg
           
 JFileChooser file
           
 JTextField host
           
 JPanel p_attributes
           
 JPanel p_db
           
 JPanel p_error
           
 JPanel p_file
           
 JPanel p_main
           
 JTextField passwd
           
 JTextField port
           
 JTextField table
           
 JTextField user
           
 
Fields inherited from class org.swixml.SwingEngine
DEBUG_MODE, MAC_OSX_LOCALE_VARIANT
 
Constructor Summary
GT2DatasourceFactoryChooser()
           
GT2DatasourceFactoryChooser(Frame owner)
           
GT2DatasourceFactoryChooser(Frame owner, String title)
           
GT2DatasourceFactoryChooser(Frame owner, String title, HashMap in_ds_factories)
           
 
Method Summary
 void actionPerformed(ActionEvent e)
          Invoked when an action occurs.
 org.geotools.data.DataSource choose()
           
static int detectType(org.geotools.data.DataSourceFactorySpi ds)
           
static HashMap getAvailableDS()
           
 String getDSName()
           
 Map getDSParamMap()
           
 boolean isCancelled()
           
 void itemStateChanged(ItemEvent e)
           
static void main(String[] args)
           
 void setFactories(HashMap in_ds_factories)
           
 void setLocation(int x, int y)
           
 void setTitle(String title)
           
static String throwableToString(Throwable t)
           
 
Methods inherited from class org.swixml.SwingEngine
cleanup, find, forget, getAllComponentItertor, getAppFrame, getClassLoader, getClient, getDescendants, getIdComponentItertor, getIdMap, getLocalizer, getRootComponent, getTaglib, insert, insert, insert, insert, isMacOSX, isMacOSXSupported, render, render, render, render, render, setActionListener, setAppFrame, setClassLoader, setDefaultLocale, setLocale, setMacOSXSuport, setResourceBundle, setResourceBundleName, test
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

p_main

public JPanel p_main

p_attributes

public JPanel p_attributes

p_file

public JPanel p_file

p_db

public JPanel p_db

p_error

public JPanel p_error

errormsg

public JTextPane errormsg

user

public JTextField user

passwd

public JTextField passwd

host

public JTextField host

port

public JTextField port

table

public JTextField table

file

public JFileChooser file

ds_factorychooser

public JComboBox ds_factorychooser

DS_FILE

public static int DS_FILE

DS_DB

public static int DS_DB

DS_ERROR

public static int DS_ERROR

database

public JTextField database
Constructor Detail

GT2DatasourceFactoryChooser

public GT2DatasourceFactoryChooser()
                            throws Exception

GT2DatasourceFactoryChooser

public GT2DatasourceFactoryChooser(Frame owner)
                            throws Exception

GT2DatasourceFactoryChooser

public GT2DatasourceFactoryChooser(Frame owner,
                                   String title)
                            throws Exception

GT2DatasourceFactoryChooser

public GT2DatasourceFactoryChooser(Frame owner,
                                   String title,
                                   HashMap in_ds_factories)
                            throws Exception
Method Detail

setLocation

public void setLocation(int x,
                        int y)

setTitle

public void setTitle(String title)

setFactories

public void setFactories(HashMap in_ds_factories)

choose

public org.geotools.data.DataSource choose()
                                    throws Exception
Throws:
Exception

isCancelled

public boolean isCancelled()

getDSName

public String getDSName()

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

actionPerformed

public void actionPerformed(ActionEvent e)
Invoked when an action occurs.

Specified by:
actionPerformed in interface ActionListener

itemStateChanged

public void itemStateChanged(ItemEvent e)
Specified by:
itemStateChanged in interface ItemListener

getDSParamMap

public Map getDSParamMap()

getAvailableDS

public static HashMap getAvailableDS()
                              throws org.geotools.data.DataSourceException
Throws:
org.geotools.data.DataSourceException

detectType

public static int detectType(org.geotools.data.DataSourceFactorySpi ds)

throwableToString

public static String throwableToString(Throwable t)