com.melloware.jukes.gui.view.editor
Class AbstractEditor
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.melloware.jukes.gui.view.editor.AbstractEditor
- All Implemented Interfaces:
- Editor, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible
- Direct Known Subclasses:
- ArtistEditor, DiscEditor, TrackEditor
public abstract class AbstractEditor
- extends javax.swing.JPanel
- implements Editor
The abstract superclass of all Editor implementations.
Copyright (c) 1999-2007 Melloware, Inc.
- Version:
- 4.0
- Author:
- Emil A. Lefkof III
- See Also:
- Serialized Form
| 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 |
| 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 |
AbstractEditor(javax.swing.Icon icon)
Constructs an AbstractEditor with the specified icon. |
AbstractEditor(javax.swing.Icon icon,
java.lang.String titlePrefix)
Constructs an AbstractEditor with the specified
Icon and title prefix. |
AbstractEditor(java.lang.String titlePrefix)
Constructs an AbstractEditor with the specified title
prefix. |
|
Method Summary |
void |
activate()
Activates this viewer. |
protected abstract void |
build()
Builds this panel. |
protected javax.swing.JComponent |
buildAuditInfoPanel()
Builds the audit information panel which displays the created by, and
modified by info of a ORM record. |
protected javax.swing.JComponent |
buildHintAreaPane()
Builds the hint area panel where validation hints are displayed. |
void |
commit()
Commits any changes made to this editor. |
void |
deactivate()
Deactivates this viewer. |
void |
delete()
Delete the object and its descendants contained by this editor. |
void |
findCover()
Tries to find a new cover for the disc. |
abstract java.lang.Class |
getDomainClass()
Returns the class used to register this instance in the UpdateManager. |
javax.swing.JToolBar |
getHeaderToolBar()
Answers this Editor's JToolBar. |
javax.swing.Icon |
getIcon()
Answers this Editor's Icon. |
protected MainFrame |
getMainFrame()
Gets the MainFrame for the application. |
protected MainModule |
getMainModule()
Gets the MainModule for the application. |
java.lang.Object |
getModel()
Returns this editor's underlying model. |
AbstractJukesObject |
getOrmObject()
Returns this editor's underlying model as an AbstractJukesObject. |
protected Settings |
getSettings()
Gets the settings for the application. |
java.lang.String |
getTitle()
Answers this Editor's title. |
protected abstract java.lang.String |
getTitleSuffix()
Returns a suffix for this editor's title. |
javax.swing.JToolBar |
getToolBar()
Answers this Editor's JToolBar. |
protected AbstractValidationModel |
getValidationModel()
Gets the validationModel. |
protected boolean |
hasErrors()
Does this editor pass validation right now. |
protected void |
initEventHandling()
Initializes any event handling. |
void |
lock()
Locks this viewer and updates all text fields and buttons. |
void |
renameFiles()
Renames any files this editor owns. |
void |
rollback()
Rollback any changes made to this editor |
protected void |
setBusyCursor(boolean aBusy)
Sets the cursor to hourglass for true and default for false. |
void |
setModel(java.lang.Object newModel)
Sets a new model. |
void |
unlock()
Unlocks this viewer and updates all text fields and buttons. |
protected abstract void |
updateModel()
Writes the view contents to the underlying model. |
protected abstract void |
updateView()
Reads the view contents from the underlying model. |
void |
webSearch()
Perform the web service search to look for disc info. |
| 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, 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, 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, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DATE_FORMAT
protected static final java.text.SimpleDateFormat DATE_FORMAT
FONT_ENABLED
protected static final java.awt.Font FONT_ENABLED
FONT_DISABLED
protected static final java.awt.Font FONT_DISABLED
BORDER_ENABLED
protected static final javax.swing.border.Border BORDER_ENABLED
BORDER_DISABLED
protected static final javax.swing.border.Border BORDER_DISABLED
HINT
protected static final java.lang.String HINT
- See Also:
- Constant Field Values
validationModel
protected AbstractValidationModel validationModel
icon
protected final javax.swing.Icon icon
hintAreaPane
protected javax.swing.JComponent hintAreaPane
createdByLabel
protected javax.swing.JLabel createdByLabel
createdDateLabel
protected javax.swing.JLabel createdDateLabel
hintLabel
protected javax.swing.JLabel hintLabel
modifiedByLabel
protected javax.swing.JLabel modifiedByLabel
modifiedDateLabel
protected javax.swing.JLabel modifiedDateLabel
hintArea
protected javax.swing.JTextArea hintArea
progressMonitor
protected javax.swing.ProgressMonitor progressMonitor
titlePrefix
protected final java.lang.String titlePrefix
timer
protected javax.swing.Timer timer
task
protected UpdateTagsTask task
AbstractEditor
public AbstractEditor(javax.swing.Icon icon)
- Constructs an
AbstractEditor with the specified icon.
AbstractEditor
public AbstractEditor(java.lang.String titlePrefix)
- Constructs an
AbstractEditor with the specified title
prefix.
AbstractEditor
public AbstractEditor(javax.swing.Icon icon,
java.lang.String titlePrefix)
- Constructs an
AbstractEditor with the specified
Icon and title prefix.
getDomainClass
public abstract java.lang.Class getDomainClass()
- Returns the class used to register this instance in the UpdateManager.
- Specified by:
getDomainClass in interface Editor
getHeaderToolBar
public javax.swing.JToolBar getHeaderToolBar()
- Answers this
Editor's JToolBar.
The default implementation specifies that no tool bar is used.
- Specified by:
getHeaderToolBar in interface Editor
getIcon
public javax.swing.Icon getIcon()
- Answers this
Editor's Icon.
- Specified by:
getIcon in interface Editor
getModel
public java.lang.Object getModel()
- Returns this editor's underlying model.
- Specified by:
getModel in interface Editor
getOrmObject
public AbstractJukesObject getOrmObject()
- Returns this editor's underlying model as an AbstractJukesObject.
getTitle
public java.lang.String getTitle()
- Answers this
Editor's title.
- Specified by:
getTitle in interface Editor
getToolBar
public javax.swing.JToolBar getToolBar()
- Answers this
Editor's JToolBar.
The default implementation specifies that no tool bar is used.
- Specified by:
getToolBar in interface Editor
setModel
public void setModel(java.lang.Object newModel)
- Sets a new model. Does nothing if the old and new model are the same.
If the model changes, invokes
#updateView.
- Specified by:
setModel in interface Editor
- Parameters:
newModel - the model to set
activate
public void activate()
- Activates this viewer.
- Specified by:
activate in interface Editor
commit
public void commit()
- Commits any changes made to this editor.
unlock
public void unlock()
- Unlocks this viewer and updates all text fields and buttons.
lock
public void lock()
- Locks this viewer and updates all text fields and buttons.
deactivate
public void deactivate()
- Deactivates this viewer.
- Specified by:
deactivate in interface Editor
delete
public void delete()
- Delete the object and its descendants contained by this editor.
findCover
public void findCover()
- Tries to find a new cover for the disc.
renameFiles
public void renameFiles()
- Renames any files this editor owns.
rollback
public void rollback()
- Rollback any changes made to this editor
webSearch
public void webSearch()
- Perform the web service search to look for disc info.
getTitleSuffix
protected abstract java.lang.String getTitleSuffix()
- Returns a suffix for this editor's title.
- Returns:
- a suffix for this editor's title
build
protected abstract void build()
- Builds this panel.
updateModel
protected abstract void updateModel()
- Writes the view contents to the underlying model.
updateView
protected abstract void updateView()
- Reads the view contents from the underlying model.
getMainFrame
protected MainFrame getMainFrame()
- Gets the MainFrame for the application.
- Returns:
- the MainFrame object
getMainModule
protected MainModule getMainModule()
- Gets the MainModule for the application.
- Returns:
- the MainModule object
getSettings
protected Settings getSettings()
- Gets the settings for the application.
- Returns:
- the Settings object of user defined settings
getValidationModel
protected AbstractValidationModel getValidationModel()
- Gets the validationModel.
- Returns:
- Returns the validationModel.
setBusyCursor
protected void setBusyCursor(boolean aBusy)
- Sets the cursor to hourglass for true and default for false. Used for
long operations such as saves.
- Parameters:
aBusy - true for busy cursor, false for default
buildAuditInfoPanel
protected javax.swing.JComponent buildAuditInfoPanel()
- Builds the audit information panel which displays the created by, and
modified by info of a ORM record.
- Returns:
- the panel to display the audit info
buildHintAreaPane
protected javax.swing.JComponent buildHintAreaPane()
- Builds the hint area panel where validation hints are displayed.
- Returns:
- the panel to display the hints
hasErrors
protected boolean hasErrors()
- Does this editor pass validation right now. True if so false otherwise.
- Returns:
- true if passes validation
initEventHandling
protected void initEventHandling()
- Initializes any event handling.
Copyright © 1999-2008 Melloware Inc. All Rights Reserved.