org.deegree_impl.tools
Class LecGUI

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended byorg.deegree_impl.tools.LecGUI
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class LecGUI
extends javax.swing.JPanel

Version:
Author:
This GUI is for creating Legend Element, which are small thumbnails with textlabel and title showing the defined styles from a SLD.
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
(package private)  LecGUIButtonHandler bel
           
protected static java.lang.String BTEXIT
           
protected static java.lang.String BTINFO
           
protected static java.lang.String BTOPENSOURCE
           
protected static java.lang.String BTOPENTARGET
           
protected static java.lang.String BTSTART
           
private  javax.swing.JPanel buttonPanel
           
private  javax.swing.JComboBox colorCBox
           
private  javax.swing.JPanel debugPanel
           
private  javax.swing.JTextArea debugTextArea
           
private static java.lang.String DEFAULTCOLOR
           
private static java.lang.String DEFAULTFORMAT
           
private static int DEFAULTHEIGHT
           
private static int DEFAULTWIDTH
           
private  javax.swing.JButton exitbutton
           
protected static java.lang.String EXITMENUITEM
           
private static java.lang.String FILEMENU
           
private  javax.swing.JPanel filePanel
           
private  javax.swing.JComboBox formatCBox
           
private  javax.swing.JSpinner heightspinner
           
private static java.lang.String HELPMENU
           
private  javax.swing.JButton infobutton
           
protected static java.lang.String INFOMENUITEM
           
private  java.lang.String lastDir
           
(package private)  LecGUIMenuHandler mel
           
protected static java.lang.String OPENSOURCEMENUITEM
           
protected static java.lang.String OPENTARGETMENUITEM
           
private  javax.swing.JPanel optionsPanel
           
private static java.lang.String[] POSSIBLE_OUTPUT_COLORS
           
private static java.lang.String[] POSSIBLE_OUTPUT_FORMAT
           
private  javax.swing.JTextField sourcesld_tf
           
private  javax.swing.JButton startbutton
           
protected static java.lang.String STARTMENUITEM
           
private  javax.swing.JTextField targetdir_tf
           
private static java.lang.String TITLE
           
private  javax.swing.JTextField titletextfield
           
private  javax.swing.JSpinner widthspinner
           
 
Fields inherited from class javax.swing.JPanel
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Container
 
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, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
private LecGUI()
          Creates new form LecGUI
 
Method Summary
protected  void addDebugInformation(java.lang.String debuginformation)
           
private  void appendMenuItem(java.lang.String name, javax.swing.JMenu menu)
          help method to init the menu
protected  void doStart()
          the funcionality of the program. parses the input from the gui-elements and passes them to the LegendElementCreator class.
private  java.awt.Color getColorFromString(java.lang.String colorstring)
          reads out the color from the string and returns the corresponding color.
private  java.lang.String getDestDirTextfieldContent()
          returns the content of the open dialog destination/target-textfield
private  java.lang.String getSelectedColor()
           
private  java.lang.String getSelectedFormat()
           
private  java.lang.String getSelectedHeight()
           
private  java.lang.String getSelectedTitle()
           
private  java.lang.String getSelectedWidth()
           
private  java.lang.String getSourceTextfieldContent()
          returns the content of the open dialog source-textfield
private  javax.swing.JPanel initButtonPanel()
          inits the button-panel
private  void initComponents()
          initializes the GUI.
private  javax.swing.JPanel initDebugPanel()
           
private  javax.swing.JPanel initFilePanel()
          inits the filepanel, the panel at the top to choose the files.
private  javax.swing.JMenuBar initMenuBar()
          creates the menubar. called from the main-method, not the constructor.
private  javax.swing.JPanel initOptionsPanel()
          inits the option-panel.
static void main(java.lang.String[] args)
           
protected  void openDirChooser()
          opens the target-dir file chooser. only dirs are available for selection
protected  void openFileChooser()
          opens the file chooser
private  void setDestdirTextfieldContent(java.lang.String content)
           
private  void setSourceTextfieldContent(java.lang.String content)
           
protected  void showInfo()
          shows the Info in a JOptionPane
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TITLE

private static java.lang.String TITLE

lastDir

private java.lang.String lastDir

DEFAULTFORMAT

private static java.lang.String DEFAULTFORMAT

DEFAULTCOLOR

private static java.lang.String DEFAULTCOLOR

DEFAULTWIDTH

private static int DEFAULTWIDTH

DEFAULTHEIGHT

private static int DEFAULTHEIGHT

POSSIBLE_OUTPUT_FORMAT

private static java.lang.String[] POSSIBLE_OUTPUT_FORMAT

POSSIBLE_OUTPUT_COLORS

private static java.lang.String[] POSSIBLE_OUTPUT_COLORS

filePanel

private javax.swing.JPanel filePanel

sourcesld_tf

private javax.swing.JTextField sourcesld_tf

targetdir_tf

private javax.swing.JTextField targetdir_tf

BTOPENSOURCE

protected static final java.lang.String BTOPENSOURCE
See Also:
Constant Field Values

BTOPENTARGET

protected static final java.lang.String BTOPENTARGET
See Also:
Constant Field Values

optionsPanel

private javax.swing.JPanel optionsPanel

formatCBox

private javax.swing.JComboBox formatCBox

colorCBox

private javax.swing.JComboBox colorCBox

widthspinner

private javax.swing.JSpinner widthspinner

heightspinner

private javax.swing.JSpinner heightspinner

titletextfield

private javax.swing.JTextField titletextfield

buttonPanel

private javax.swing.JPanel buttonPanel

startbutton

private javax.swing.JButton startbutton

infobutton

private javax.swing.JButton infobutton

exitbutton

private javax.swing.JButton exitbutton

BTSTART

protected static final java.lang.String BTSTART
See Also:
Constant Field Values

BTINFO

protected static final java.lang.String BTINFO
See Also:
Constant Field Values

BTEXIT

protected static final java.lang.String BTEXIT
See Also:
Constant Field Values

debugPanel

private javax.swing.JPanel debugPanel

debugTextArea

private javax.swing.JTextArea debugTextArea

FILEMENU

private static final java.lang.String FILEMENU
See Also:
Constant Field Values

OPENSOURCEMENUITEM

protected static final java.lang.String OPENSOURCEMENUITEM
See Also:
Constant Field Values

OPENTARGETMENUITEM

protected static final java.lang.String OPENTARGETMENUITEM
See Also:
Constant Field Values

STARTMENUITEM

protected static final java.lang.String STARTMENUITEM
See Also:
Constant Field Values

EXITMENUITEM

protected static final java.lang.String EXITMENUITEM
See Also:
Constant Field Values

HELPMENU

private static final java.lang.String HELPMENU
See Also:
Constant Field Values

INFOMENUITEM

protected static final java.lang.String INFOMENUITEM
See Also:
Constant Field Values

bel

LecGUIButtonHandler bel

mel

LecGUIMenuHandler mel
Constructor Detail

LecGUI

private LecGUI()
Creates new form LecGUI

Method Detail

initComponents

private void initComponents()
initializes the GUI. Calls several methods, which inits the several gui-elements.


initDebugPanel

private javax.swing.JPanel initDebugPanel()
Returns:

initFilePanel

private javax.swing.JPanel initFilePanel()
inits the filepanel, the panel at the top to choose the files.

Returns:
the JPanel containing the gui-elements to open the file and dir.

initOptionsPanel

private javax.swing.JPanel initOptionsPanel()
inits the option-panel.

Returns:
the option-panel containing the gui-elements to choose the options

initButtonPanel

private javax.swing.JPanel initButtonPanel()
inits the button-panel

Returns:
the button-panel containing the start, info and exit buttons.

initMenuBar

private javax.swing.JMenuBar initMenuBar()
creates the menubar. called from the main-method, not the constructor.

Returns:
the menubar.

appendMenuItem

private void appendMenuItem(java.lang.String name,
                            javax.swing.JMenu menu)
help method to init the menu

Parameters:
name - name of the menu-item
menu - the menu

getSourceTextfieldContent

private java.lang.String getSourceTextfieldContent()
returns the content of the open dialog source-textfield

Returns:
content of the source-textfield

setSourceTextfieldContent

private void setSourceTextfieldContent(java.lang.String content)
Parameters:
content - the text in the source-textfield
See Also:
getSourceTextfieldContent()

getDestDirTextfieldContent

private java.lang.String getDestDirTextfieldContent()
returns the content of the open dialog destination/target-textfield

Returns:
content of the targetdir-textfield

setDestdirTextfieldContent

private void setDestdirTextfieldContent(java.lang.String content)
Parameters:
content - the text in the targetdir-textfield
See Also:
getDestDirTextfieldContent()

getSelectedFormat

private java.lang.String getSelectedFormat()
Returns:

getSelectedColor

private java.lang.String getSelectedColor()
Returns:

getSelectedWidth

private java.lang.String getSelectedWidth()
Returns:

getSelectedHeight

private java.lang.String getSelectedHeight()
Returns:

getSelectedTitle

private java.lang.String getSelectedTitle()
Returns:

addDebugInformation

protected void addDebugInformation(java.lang.String debuginformation)
Parameters:
debuginformation -

main

public static void main(java.lang.String[] args)
Parameters:
args -

doStart

protected void doStart()
the funcionality of the program. parses the input from the gui-elements and passes them to the LegendElementCreator class.


getColorFromString

private java.awt.Color getColorFromString(java.lang.String colorstring)
reads out the color from the string and returns the corresponding color.

Parameters:
colorstring - the color as string
Returns:
the color

openFileChooser

protected void openFileChooser()
opens the file chooser


openDirChooser

protected void openDirChooser()
opens the target-dir file chooser. only dirs are available for selection


showInfo

protected void showInfo()
shows the Info in a JOptionPane