org.gerhardb.jibs.viewer
Class ViewerPreferences

java.lang.Object
  extended byorg.gerhardb.jibs.viewer.ViewerPreferences

public class ViewerPreferences
extends java.lang.Object

Wraps the preferences used by the viewer and provides an way of editing the preferences.

Author:
Gerhard Beck

Field Summary
static int RESIZE_FULL
           
static int RESIZE_HEIGHT
           
static int RESIZE_NOT
           
static int RESIZE_WIDTH
           
static int START_LAST_VIEWED_DIRECTORY
           
static int START_NO_DIRECTORY
           
static int START_PARTICULAR_DIRECTORY
           
 
Method Summary
static void addResize(javax.swing.JMenu menu)
          Makes a new set for each UI its used on.
static boolean blowUp()
           
static void clear()
          Clears all preferences, typically for testing a new user.
static boolean continuousShow()
           
static boolean countFiles()
           
static void flush()
           
static java.lang.String getDeleteDirectory()
          Does not guess for Windows since the Windows Recycle Bin exists separately on each drive, so this could potentiall vary as the user moves around.
static java.lang.String getLastViewedDirectory()
           
static int getMaxBlow()
           
static java.util.prefs.Preferences getPrefs()
           
static javax.swing.Action[] getResizeActions()
           
static int getResizeOnFly()
           
static int getSlideFlipDelay()
          Show delay
static javax.swing.Action[] getSortActions()
           
static int getSortOrder()
           
static java.lang.String getStartDirectory()
           
static int getStartType()
           
static java.lang.String getTreeDirectory()
           
static boolean immediateShow()
           
static void init()
           
static boolean isSaveEnabled()
           
static void main(java.lang.String[] args)
           
static javax.swing.JRadioButton[] makeResizeRadioButtons()
          Makes a new set for each UI its used on.
static javax.swing.JMenu makeSortMenu()
          Makes a new set for each UI its used on.
static javax.swing.JRadioButton[] makeSortRadioButtons()
          Makes a new set for each UI its used on.
static void setBlowUp(boolean blowUp)
           
static void setContinuousShow(boolean continuousShow)
           
static void setCountFiles(boolean countFiles)
           
static void setDeleteDirectory(java.lang.String dir)
           
static void setImmediateShow(boolean startShow)
           
static void setLastViewedDirectory(java.lang.String dir)
           
static void setMaxBlow(int times)
           
static void setOverrideTreeDirectory(java.lang.String override)
          Overrides the stored tree directory.
static void setResizeOnFly(int resize)
           
static void setSaveEnabled(boolean saveEnabled)
           
static void setSlideFlipDelay(int milliseconds)
           
static void setSortOrder(int order)
           
static void setStartDirectory(java.lang.String dir)
           
static void setStartFullScreen(boolean startFullScreen)
           
static void setStartType(int startType)
           
static void setTreeDirectory(java.lang.String dir)
           
static boolean startFullScreen()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

START_NO_DIRECTORY

public static final int START_NO_DIRECTORY
See Also:
Constant Field Values

START_LAST_VIEWED_DIRECTORY

public static final int START_LAST_VIEWED_DIRECTORY
See Also:
Constant Field Values

START_PARTICULAR_DIRECTORY

public static final int START_PARTICULAR_DIRECTORY
See Also:
Constant Field Values

RESIZE_NOT

public static final int RESIZE_NOT
See Also:
Constant Field Values

RESIZE_WIDTH

public static final int RESIZE_WIDTH
See Also:
Constant Field Values

RESIZE_HEIGHT

public static final int RESIZE_HEIGHT
See Also:
Constant Field Values

RESIZE_FULL

public static final int RESIZE_FULL
See Also:
Constant Field Values
Method Detail

init

public static void init()
Throws:
java.lang.SecurityException

getPrefs

public static java.util.prefs.Preferences getPrefs()

getLastViewedDirectory

public static java.lang.String getLastViewedDirectory()

setLastViewedDirectory

public static void setLastViewedDirectory(java.lang.String dir)

getStartDirectory

public static java.lang.String getStartDirectory()

setStartDirectory

public static void setStartDirectory(java.lang.String dir)

setOverrideTreeDirectory

public static void setOverrideTreeDirectory(java.lang.String override)
Overrides the stored tree directory. Designed to be use when requestiong a specific tree directory from the command line.


getTreeDirectory

public static java.lang.String getTreeDirectory()

setTreeDirectory

public static void setTreeDirectory(java.lang.String dir)

getDeleteDirectory

public static java.lang.String getDeleteDirectory()
Does not guess for Windows since the Windows Recycle Bin exists separately on each drive, so this could potentiall vary as the user moves around. Otherwise it is likely a hidden directory at c:\RECYCLED.

Returns:
null if not correctly set.

setDeleteDirectory

public static void setDeleteDirectory(java.lang.String dir)

getStartType

public static int getStartType()

setStartType

public static void setStartType(int startType)

isSaveEnabled

public static boolean isSaveEnabled()

setSaveEnabled

public static void setSaveEnabled(boolean saveEnabled)

startFullScreen

public static boolean startFullScreen()

immediateShow

public static boolean immediateShow()

continuousShow

public static boolean continuousShow()

blowUp

public static boolean blowUp()

getMaxBlow

public static int getMaxBlow()

getSlideFlipDelay

public static int getSlideFlipDelay()
Show delay

Returns:
seconds

setStartFullScreen

public static void setStartFullScreen(boolean startFullScreen)

setImmediateShow

public static void setImmediateShow(boolean startShow)

setContinuousShow

public static void setContinuousShow(boolean continuousShow)

setBlowUp

public static void setBlowUp(boolean blowUp)

setMaxBlow

public static void setMaxBlow(int times)

setSlideFlipDelay

public static void setSlideFlipDelay(int milliseconds)

countFiles

public static boolean countFiles()

setCountFiles

public static void setCountFiles(boolean countFiles)

getSortOrder

public static int getSortOrder()

setSortOrder

public static void setSortOrder(int order)

getResizeOnFly

public static int getResizeOnFly()

setResizeOnFly

public static void setResizeOnFly(int resize)

getSortActions

public static javax.swing.Action[] getSortActions()

makeSortMenu

public static javax.swing.JMenu makeSortMenu()
Makes a new set for each UI its used on.

Returns:
Sort Menu

makeSortRadioButtons

public static javax.swing.JRadioButton[] makeSortRadioButtons()
Makes a new set for each UI its used on.

Returns:
Sort Radio Buttons

getResizeActions

public static javax.swing.Action[] getResizeActions()

addResize

public static void addResize(javax.swing.JMenu menu)
Makes a new set for each UI its used on.


makeResizeRadioButtons

public static javax.swing.JRadioButton[] makeResizeRadioButtons()
Makes a new set for each UI its used on.

Returns:
Resize buttons

clear

public static void clear()
                  throws java.util.prefs.BackingStoreException
Clears all preferences, typically for testing a new user.

Throws:
java.util.prefs.BackingStoreException

flush

public static void flush()

main

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


Copyright © 2002 Gerhard Beck. All rights reserved. Subject to GPL.