cz.hdf.cdnavigator.gui
Class PhotoCameraPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by cz.hdf.gui.HPanel
                      extended by cz.hdf.cdnavigator.gui.PhotoCameraPanel
All Implemented Interfaces:
cz.hdf.gui.HRelocalize, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class PhotoCameraPanel
extends cz.hdf.gui.HPanel

Author:
hunter
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private  javax.swing.JButton addAlbumButton
          button for inserting new albums into albumCombo
private  javax.swing.JButton addButton
          button for inserting new items
private  javax.swing.JComboBox albumCombo
          new album name field
private  cz.hdf.gui.HButton camRenameButton
          rename photos
private  cz.hdf.gui.HButton camRotateButton
          rotate photos
private  cz.hdf.gui.HButton camSortButton
          sort photos by date
protected  CDWindow cdWindow
           
private  javax.swing.JButton delButton
          button to removing items
static java.lang.String DELETE_PHOTOS_ALL
           
static java.lang.String DELETE_PHOTOS_RANGE
           
private  cz.hdf.gui.HRadioButton deleteAllRadio
           
private  javax.swing.JButton deleteButton
           
private  javax.swing.JTextArea deleteCommandArea
           
private  cz.hdf.gui.HCheckBox deleteGenerateCheck
           
private  javax.swing.JTextField deleteRangeField
           
private  cz.hdf.gui.HRadioButton deleteRangeRadio
           
private  javax.swing.JButton downButton
          button to change order items
static java.lang.String DOWNLOAD_PHOTOS_ALL
           
static java.lang.String DOWNLOAD_PHOTOS_NEW
           
static java.lang.String DOWNLOAD_PHOTOS_RANGE
           
private  cz.hdf.gui.HRadioButton downloadAllRadio
           
private  javax.swing.JButton downloadButton
           
private  javax.swing.JTextArea downloadCommandArea
           
private  cz.hdf.gui.HCheckBox downloadForceCheck
           
private  cz.hdf.gui.HCheckBox downloadGenerateCheck
           
private  cz.hdf.gui.HRadioButton downloadNewRadio
           
private  javax.swing.JTextField downloadRangeField
           
private  cz.hdf.gui.HRadioButton downloadRangeRadio
           
private  java.lang.String editedAlbum
           
private  javax.swing.JList filesList
           
private  javax.swing.DefaultListModel filesListModel
          model for list
private  javax.swing.JButton gphoto2Button
           
private  javax.swing.JTextField gphoto2Field
          command field
(package private)  java.util.logging.Logger logger
          Logger.
private  cz.hdf.gui.HButtonNoted orientButton
           
private  javax.swing.JComboBox orientCombo
           
private  cz.hdf.gui.HLabel orientLabel
           
private  javax.swing.JButton refreshButton
          button to refresh files
private  cz.hdf.gui.HLabel rotateLabel
           
private  cz.hdf.gui.HButtonNoted rotateLeftButton
           
private  cz.hdf.gui.HButtonNoted rotateRightButton
           
private  cz.hdf.gui.HButtonNoted shiftButton
           
private  javax.swing.JSpinner shiftDaySpinner
           
private  javax.swing.JSpinner shiftHourSpinner
           
private  cz.hdf.gui.HLabel shiftLabel
           
private  javax.swing.JSpinner shiftMinSpinner
           
private  javax.swing.JSpinner shiftSecSpinner
           
private  cz.hdf.gui.HImagePanel thumbImagePanel
           
private  cz.hdf.gui.HButtonNoted timeButton
           
private  com.toedter.calendar.JDateChooser timeChooser
           
private  cz.hdf.gui.HLabel timeLabel
           
private  javax.swing.JButton upButton
          button to change order items
protected  PhotoWindow window
          parent window
 
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.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
PhotoCameraPanel(PhotoWindow _window)
           
 
Method Summary
private  void deleteSelectedPhotos()
          Delete selected photos/files from filesList.
protected  void generateDeleteCommand()
          If generate checkbox is selected than generate and update delete command.
protected  void generateDownloadCommand()
          If generate checkbox is selected than generate and update download command.
 java.io.File getAlbumDirectory()
          Find or create album in roast dir.
 java.lang.String[] getAllAlbums()
          Find all directories in roast dir.
 void loadAlbumFiles()
          Load-Add photo files from album in roast dir.
 boolean needRotateAccordingOrientation(java.io.File _file)
          True if photo file need rotate to normal position.
 void removeFile(java.io.File _file)
           
 int rotateAccordingOrientation(java.io.File _file)
          ?
protected  void saveDeleteSettings()
          Save GUI values from delete* components into Config.
protected  void saveDownloadSettings()
          Save GUI values from download* components into Config.
protected  void updateDeleteState()
          Set enabled/disabled state for delete* components according to generate checkbox.
protected  void updateDownloadState()
          Set enabled/disabled state for download* components according to generate checkbox.
private  void updateThumb()
           
 
Methods inherited from class cz.hdf.gui.HPanel
relocalize
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, 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, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DOWNLOAD_PHOTOS_ALL

public static final java.lang.String DOWNLOAD_PHOTOS_ALL
See Also:
Constant Field Values

DOWNLOAD_PHOTOS_NEW

public static final java.lang.String DOWNLOAD_PHOTOS_NEW
See Also:
Constant Field Values

DOWNLOAD_PHOTOS_RANGE

public static final java.lang.String DOWNLOAD_PHOTOS_RANGE
See Also:
Constant Field Values

DELETE_PHOTOS_ALL

public static final java.lang.String DELETE_PHOTOS_ALL
See Also:
Constant Field Values

DELETE_PHOTOS_RANGE

public static final java.lang.String DELETE_PHOTOS_RANGE
See Also:
Constant Field Values

gphoto2Field

private javax.swing.JTextField gphoto2Field
command field


gphoto2Button

private javax.swing.JButton gphoto2Button

downloadCommandArea

private javax.swing.JTextArea downloadCommandArea

downloadGenerateCheck

private cz.hdf.gui.HCheckBox downloadGenerateCheck

downloadAllRadio

private cz.hdf.gui.HRadioButton downloadAllRadio

downloadNewRadio

private cz.hdf.gui.HRadioButton downloadNewRadio

downloadRangeRadio

private cz.hdf.gui.HRadioButton downloadRangeRadio

downloadRangeField

private javax.swing.JTextField downloadRangeField

downloadForceCheck

private cz.hdf.gui.HCheckBox downloadForceCheck

downloadButton

private javax.swing.JButton downloadButton

deleteCommandArea

private javax.swing.JTextArea deleteCommandArea

deleteGenerateCheck

private cz.hdf.gui.HCheckBox deleteGenerateCheck

deleteAllRadio

private cz.hdf.gui.HRadioButton deleteAllRadio

deleteRangeRadio

private cz.hdf.gui.HRadioButton deleteRangeRadio

deleteRangeField

private javax.swing.JTextField deleteRangeField

deleteButton

private javax.swing.JButton deleteButton

albumCombo

private javax.swing.JComboBox albumCombo
new album name field


addAlbumButton

private javax.swing.JButton addAlbumButton
button for inserting new albums into albumCombo


filesList

private javax.swing.JList filesList

filesListModel

private javax.swing.DefaultListModel filesListModel
model for list


addButton

private javax.swing.JButton addButton
button for inserting new items


delButton

private javax.swing.JButton delButton
button to removing items


upButton

private javax.swing.JButton upButton
button to change order items


downButton

private javax.swing.JButton downButton
button to change order items


refreshButton

private javax.swing.JButton refreshButton
button to refresh files


camSortButton

private cz.hdf.gui.HButton camSortButton
sort photos by date


camRotateButton

private cz.hdf.gui.HButton camRotateButton
rotate photos


camRenameButton

private cz.hdf.gui.HButton camRenameButton
rename photos


thumbImagePanel

private cz.hdf.gui.HImagePanel thumbImagePanel

rotateLabel

private cz.hdf.gui.HLabel rotateLabel

rotateLeftButton

private cz.hdf.gui.HButtonNoted rotateLeftButton

rotateRightButton

private cz.hdf.gui.HButtonNoted rotateRightButton

orientLabel

private cz.hdf.gui.HLabel orientLabel

orientCombo

private javax.swing.JComboBox orientCombo

orientButton

private cz.hdf.gui.HButtonNoted orientButton

timeLabel

private cz.hdf.gui.HLabel timeLabel

timeChooser

private com.toedter.calendar.JDateChooser timeChooser

timeButton

private cz.hdf.gui.HButtonNoted timeButton

shiftLabel

private cz.hdf.gui.HLabel shiftLabel

shiftDaySpinner

private javax.swing.JSpinner shiftDaySpinner

shiftHourSpinner

private javax.swing.JSpinner shiftHourSpinner

shiftMinSpinner

private javax.swing.JSpinner shiftMinSpinner

shiftSecSpinner

private javax.swing.JSpinner shiftSecSpinner

shiftButton

private cz.hdf.gui.HButtonNoted shiftButton

window

protected PhotoWindow window
parent window


cdWindow

protected CDWindow cdWindow

editedAlbum

private java.lang.String editedAlbum

logger

java.util.logging.Logger logger
Logger. Hierarchy is set to name of this class.

Constructor Detail

PhotoCameraPanel

public PhotoCameraPanel(PhotoWindow _window)
Parameters:
_window -
Method Detail

deleteSelectedPhotos

private void deleteSelectedPhotos()
Delete selected photos/files from filesList.


saveDownloadSettings

protected void saveDownloadSettings()
Save GUI values from download* components into Config.


saveDeleteSettings

protected void saveDeleteSettings()
Save GUI values from delete* components into Config.


generateDownloadCommand

protected void generateDownloadCommand()
If generate checkbox is selected than generate and update download command.


generateDeleteCommand

protected void generateDeleteCommand()
If generate checkbox is selected than generate and update delete command.


updateDownloadState

protected void updateDownloadState()
Set enabled/disabled state for download* components according to generate checkbox.


updateDeleteState

protected void updateDeleteState()
Set enabled/disabled state for delete* components according to generate checkbox.


updateThumb

private void updateThumb()

needRotateAccordingOrientation

public boolean needRotateAccordingOrientation(java.io.File _file)
True if photo file need rotate to normal position.

Parameters:
_file - photo file to check
Returns:

rotateAccordingOrientation

public int rotateAccordingOrientation(java.io.File _file)
                               throws mediautil.image.jpeg.LLJTranException,
                                      java.io.IOException
?

Parameters:
_file -
Returns:
Throws:
mediautil.image.jpeg.LLJTranException - JpegProcessingException
java.io.IOException - MetadataException

getAlbumDirectory

public java.io.File getAlbumDirectory()
Find or create album in roast dir.

Returns:

getAllAlbums

public java.lang.String[] getAllAlbums()
Find all directories in roast dir.

Returns:

loadAlbumFiles

public void loadAlbumFiles()
Load-Add photo files from album in roast dir.


removeFile

public void removeFile(java.io.File _file)
Parameters:
_file -


CDnavigator JavaDoc, HDF company www.hdf.cz