org.pdfsam.guiclient.configuration.services.xml
Class XmlGuiConfigurationService

java.lang.Object
  extended by org.pdfsam.guiclient.configuration.services.xml.XmlGuiConfigurationService
All Implemented Interfaces:
GuiConfigurationService

public class XmlGuiConfigurationService
extends java.lang.Object
implements GuiConfigurationService

GUI configuration service where values are read and written on an xml file

Author:
Andrea Vacondio

Field Summary
static java.lang.String CONFIGURATION_FILE_NAME
           
 
Constructor Summary
XmlGuiConfigurationService()
           
 
Method Summary
 void addRecentEnvironment(java.lang.String envPath)
          adds the given env ensuring that there are no duplicates, that the new env is at the top of the list and that the list size is at most 8.
 int getExtendedState()
           
 java.awt.Dimension getHorizontalDividerDimension()
           
 int getHorizontalDividerLocation()
           
 java.awt.Point getLocationOnScreen()
           
 java.util.Collection<java.lang.String> getRecentEnvironments()
           
 java.lang.String getSelectedPlugin()
           
 java.awt.Dimension getSize()
           
 java.awt.Dimension getVerticalDividerDimension()
           
 int getVerticalDividerLocation()
           
 void save()
          saves the current gui configuration
 void setExtendedState(int extendedState)
          set the extended state
 void setHorizontalDividerDimension(java.awt.Dimension horizontalDividerDimension)
          set the horizontal divider dimension
 void setHorizontalDividerLocation(int horizontalDividerLocation)
          set the horizontal divider location
 void setLocationOnScreen(java.awt.Point locationOnScreen)
          set the location on screen
 void setSelectedPlugin(java.lang.String selectedPlugin)
          set the selected plugin
 void setSize(java.awt.Dimension size)
          set the size
 void setVerticalDividerDimension(java.awt.Dimension verticalDividerDimension)
          set the vertical divider dimension
 void setVerticalDividerLocation(int verticalDividerLocation)
          set the vertical divider location
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIGURATION_FILE_NAME

public static final java.lang.String CONFIGURATION_FILE_NAME
See Also:
Constant Field Values
Constructor Detail

XmlGuiConfigurationService

public XmlGuiConfigurationService()
Method Detail

getExtendedState

public int getExtendedState()
Specified by:
getExtendedState in interface GuiConfigurationService
Returns:
the extended state
See Also:
Frame.getExtendedState()

setExtendedState

public void setExtendedState(int extendedState)
Description copied from interface: GuiConfigurationService
set the extended state

Specified by:
setExtendedState in interface GuiConfigurationService

getSize

public java.awt.Dimension getSize()
Specified by:
getSize in interface GuiConfigurationService
Returns:
See Also:
javax.swing.JFrame#getSize())

setSize

public void setSize(java.awt.Dimension size)
Description copied from interface: GuiConfigurationService
set the size

Specified by:
setSize in interface GuiConfigurationService

getLocationOnScreen

public java.awt.Point getLocationOnScreen()
Specified by:
getLocationOnScreen in interface GuiConfigurationService
Returns:
See Also:
javax.swing.JFrame#getLocationOnScreen())

setLocationOnScreen

public void setLocationOnScreen(java.awt.Point locationOnScreen)
Description copied from interface: GuiConfigurationService
set the location on screen

Specified by:
setLocationOnScreen in interface GuiConfigurationService

getHorizontalDividerLocation

public int getHorizontalDividerLocation()
Specified by:
getHorizontalDividerLocation in interface GuiConfigurationService
Returns:
the horizontal divider location

setHorizontalDividerLocation

public void setHorizontalDividerLocation(int horizontalDividerLocation)
Description copied from interface: GuiConfigurationService
set the horizontal divider location

Specified by:
setHorizontalDividerLocation in interface GuiConfigurationService

getVerticalDividerLocation

public int getVerticalDividerLocation()
Specified by:
getVerticalDividerLocation in interface GuiConfigurationService
Returns:
the vertical divider location

setVerticalDividerLocation

public void setVerticalDividerLocation(int verticalDividerLocation)
Description copied from interface: GuiConfigurationService
set the vertical divider location

Specified by:
setVerticalDividerLocation in interface GuiConfigurationService

getHorizontalDividerDimension

public java.awt.Dimension getHorizontalDividerDimension()
Specified by:
getHorizontalDividerDimension in interface GuiConfigurationService
Returns:
the horizontal divider dimension

setHorizontalDividerDimension

public void setHorizontalDividerDimension(java.awt.Dimension horizontalDividerDimension)
Description copied from interface: GuiConfigurationService
set the horizontal divider dimension

Specified by:
setHorizontalDividerDimension in interface GuiConfigurationService

getVerticalDividerDimension

public java.awt.Dimension getVerticalDividerDimension()
Specified by:
getVerticalDividerDimension in interface GuiConfigurationService
Returns:
the vertical divider dimension

setVerticalDividerDimension

public void setVerticalDividerDimension(java.awt.Dimension verticalDividerDimension)
Description copied from interface: GuiConfigurationService
set the vertical divider dimension

Specified by:
setVerticalDividerDimension in interface GuiConfigurationService

getSelectedPlugin

public java.lang.String getSelectedPlugin()
Specified by:
getSelectedPlugin in interface GuiConfigurationService
Returns:
the selected plugin

setSelectedPlugin

public void setSelectedPlugin(java.lang.String selectedPlugin)
Description copied from interface: GuiConfigurationService
set the selected plugin

Specified by:
setSelectedPlugin in interface GuiConfigurationService

getRecentEnvironments

public java.util.Collection<java.lang.String> getRecentEnvironments()
Specified by:
getRecentEnvironments in interface GuiConfigurationService
Returns:
the queue with the recent environments

addRecentEnvironment

public void addRecentEnvironment(java.lang.String envPath)
Description copied from interface: GuiConfigurationService
adds the given env ensuring that there are no duplicates, that the new env is at the top of the list and that the list size is at most 8.

Specified by:
addRecentEnvironment in interface GuiConfigurationService

save

public void save()
          throws java.io.IOException
Description copied from interface: GuiConfigurationService
saves the current gui configuration

Specified by:
save in interface GuiConfigurationService
Throws:
java.io.IOException