org.fosstrak.epcis.queryclient
Class QueryClientGui

java.lang.Object
  extended by java.awt.event.WindowAdapter
      extended by org.fosstrak.epcis.queryclient.QueryClientGui
All Implemented Interfaces:
ActionListener, WindowFocusListener, WindowListener, WindowStateListener, EventListener, AuthenticationOptionsChangeListener

public class QueryClientGui
extends WindowAdapter
implements ActionListener, AuthenticationOptionsChangeListener

Implements the GUI part of the EPCIS Query Interface client.

Author:
David Gubler

Nested Class Summary
 class QueryClientGui.JTextFieldEnhanced
          A extended JTextField which allows us to store the corresponding QueryItem.
static class QueryClientGui.ParameterType
          The enumeration of all possible query parameter types.
 class QueryClientGui.QueryItem
          A new class for a QueryItem which can store all its specific features.
 
Constructor Summary
QueryClientGui()
          The constructor.
QueryClientGui(String address)
          Constructs a new QueryClientGui which sends its queries to the given endpoint address.
 
Method Summary
 void actionPerformed(ActionEvent e)
           
 void addParameter(QueryParam param)
          Add a new query parameter.
 void clearParameters()
          Reset the query arguments.
 void configurationChanged(AuthenticationOptionsChangeEvent ace)
          Call this when the settings in the AuthenticationOptionsPanel have changed.
static void main(String[] args)
          Instantiates a new QueryClientGui and sets its look-and-feel to the one matching the current operating system.
 void windowClosing(WindowEvent e)
           
 
Methods inherited from class java.awt.event.WindowAdapter
windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowGainedFocus, windowIconified, windowLostFocus, windowOpened, windowStateChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryClientGui

public QueryClientGui()
The constructor. Starts a new thread which draws the main window.


QueryClientGui

public QueryClientGui(String address)
               throws MalformedURLException
Constructs a new QueryClientGui which sends its queries to the given endpoint address. If no such address is provided, the properties file is checked; if there is an error with reading the properties, a default url will be provided.

Parameters:
address - The address to send the queries to.
Throws:
MalformedURLException
Method Detail

actionPerformed

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

windowClosing

public void windowClosing(WindowEvent e)
Specified by:
windowClosing in interface WindowListener
Overrides:
windowClosing in class WindowAdapter

configurationChanged

public void configurationChanged(AuthenticationOptionsChangeEvent ace)
Description copied from interface: AuthenticationOptionsChangeListener
Call this when the settings in the AuthenticationOptionsPanel have changed.

Specified by:
configurationChanged in interface AuthenticationOptionsChangeListener
Parameters:
ace - an AuthenticationOptionsChangeEvent describing the changes.

clearParameters

public void clearParameters()
Reset the query arguments.


addParameter

public void addParameter(QueryParam param)
Add a new query parameter.

Parameters:
param - The query parameter to add.

main

public static void main(String[] args)
Instantiates a new QueryClientGui and sets its look-and-feel to the one matching the current operating system.

Parameters:
args - The address to which the QueryClient should send the queries to. If omitted, a default address will be provided.


Copyright © 2010. All Rights Reserved.