de.soldin.gt2jump.gps
Class GPSTrackerPlugin

java.lang.Object
  extended byde.soldin.gt2jump.gps.GPSTrackerPlugin
All Implemented Interfaces:
ActionListener, ChangeListener, Comparator, EventListener, ItemListener, com.vividsolutions.jump.workbench.plugin.PlugIn, javax.comm.SerialPortEventListener

public class GPSTrackerPlugin
extends Object
implements com.vividsolutions.jump.workbench.plugin.PlugIn, ChangeListener, ItemListener, ActionListener, Comparator, javax.comm.SerialPortEventListener

Another one size fits all class. It acts as a listener to the GPSOptionsPanel and adds functionality to it. Also it starts/stops the GPSTracker for the tracking process.

Further on the file includes three other plugins, which are closely related to the GPSTracker plugin and will only work properly if the GPSTracker is installed and functional. They are

PS: ok next time i'll split everything into separate files. word!


Field Summary
 JButton btn_test
           
 JComboBox cbox_baudrate
           
 JComboBox cbox_cs_in
           
 JComboBox cbox_cs_out
           
 JComboBox cbox_databits
           
 JComboBox cbox_flowcontrol
           
 JComboBox cbox_parity
           
 JComboBox cbox_port
           
 JComboBox cbox_processor
           
 JComboBox cbox_stopbits
           
 JLabel lbl_update
           
static String NAME
           
 JPanel p_cts
           
 JSlider sld_update
           
 JTextArea ta_output
           
 JScrollPane ta_scroll
           
 
Constructor Summary
GPSTrackerPlugin()
           
 
Method Summary
 void actionPerformed(ActionEvent e)
           
 void closeConnection()
           
 int compare(Object o1, Object o2)
           
 boolean execute(com.vividsolutions.jump.workbench.plugin.PlugInContext context)
           
 com.vividsolutions.jts.geom.Coordinate getCurrentCoordinate()
           
 String getName()
           
 Object getSetting(String key)
           
 void initialize(com.vividsolutions.jump.workbench.plugin.PlugInContext context)
           
 void initUI()
           
 boolean isActive()
           
 boolean isActive(Boolean bool)
           
 void itemStateChanged(ItemEvent e)
           
 void openConnection()
           
 void serialEvent(javax.comm.SerialPortEvent e)
           
 void setViewport(com.vividsolutions.jump.workbench.ui.Viewport vp)
           
 void stateChanged(ChangeEvent e)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

NAME

public static final String NAME
See Also:
Constant Field Values

sld_update

public JSlider sld_update

lbl_update

public JLabel lbl_update

p_cts

public JPanel p_cts

cbox_processor

public JComboBox cbox_processor

cbox_cs_in

public JComboBox cbox_cs_in

cbox_cs_out

public JComboBox cbox_cs_out

cbox_port

public JComboBox cbox_port

cbox_baudrate

public JComboBox cbox_baudrate

cbox_flowcontrol

public JComboBox cbox_flowcontrol

cbox_databits

public JComboBox cbox_databits

cbox_stopbits

public JComboBox cbox_stopbits

cbox_parity

public JComboBox cbox_parity

ta_scroll

public JScrollPane ta_scroll

ta_output

public JTextArea ta_output

btn_test

public JButton btn_test
Constructor Detail

GPSTrackerPlugin

public GPSTrackerPlugin()
Method Detail

initialize

public void initialize(com.vividsolutions.jump.workbench.plugin.PlugInContext context)
Specified by:
initialize in interface com.vividsolutions.jump.workbench.plugin.PlugIn

execute

public boolean execute(com.vividsolutions.jump.workbench.plugin.PlugInContext context)
                throws Exception
Specified by:
execute in interface com.vividsolutions.jump.workbench.plugin.PlugIn
Throws:
Exception

getName

public String getName()
Specified by:
getName in interface com.vividsolutions.jump.workbench.plugin.PlugIn

setViewport

public void setViewport(com.vividsolutions.jump.workbench.ui.Viewport vp)

isActive

public boolean isActive(Boolean bool)

isActive

public boolean isActive()

initUI

public void initUI()

itemStateChanged

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

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener

stateChanged

public void stateChanged(ChangeEvent e)
Specified by:
stateChanged in interface ChangeListener

compare

public int compare(Object o1,
                   Object o2)
Specified by:
compare in interface Comparator

serialEvent

public void serialEvent(javax.comm.SerialPortEvent e)
Specified by:
serialEvent in interface javax.comm.SerialPortEventListener

openConnection

public void openConnection()
                    throws Exception
Throws:
Exception

closeConnection

public void closeConnection()

getSetting

public Object getSetting(String key)

getCurrentCoordinate

public com.vividsolutions.jts.geom.Coordinate getCurrentCoordinate()