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, ImageObserver, MenuContainer, Serializable, Accessible
- Direct Known Subclasses:
- ArtistEditor, DiscEditor, TrackEditor
public abstract class AbstractEditor
- extends JPanel
- implements Editor
The abstract superclass of all Editor implementations.
Copyright (c) 1999-2007 Melloware, Inc.
- Version:
- 4.0
2010 AZ Development
- Author:
- Emil A. Lefkof III
- See Also:
- Serialized Form
|
Constructor Summary |
AbstractEditor(Icon icon)
Constructs an AbstractEditor with the specified icon. |
AbstractEditor(Icon icon,
String titlePrefix)
Constructs an AbstractEditor with the specified
Icon and title prefix. |
AbstractEditor(String titlePrefix)
Constructs an AbstractEditor with the specified title
prefix. |
| 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 |
DATE_FORMAT
protected static final SimpleDateFormat DATE_FORMAT
FONT_ENABLED
protected static final Font FONT_ENABLED
FONT_DISABLED
protected static final Font FONT_DISABLED
BORDER_ENABLED
protected static final Border BORDER_ENABLED
BORDER_DISABLED
protected static final Border BORDER_DISABLED
HINT
protected static final String HINT
- See Also:
- Constant Field Values
validationModel
protected AbstractValidationModel validationModel
icon
protected final Icon icon
hintAreaPane
protected JComponent hintAreaPane
createdByLabel
protected JLabel createdByLabel
createdDateLabel
protected JLabel createdDateLabel
hintLabel
protected JLabel hintLabel
modifiedByLabel
protected JLabel modifiedByLabel
modifiedDateLabel
protected JLabel modifiedDateLabel
hintArea
protected JTextArea hintArea
progressMonitor
protected ProgressMonitor progressMonitor
titlePrefix
protected final String titlePrefix
timer
protected Timer timer
task
protected UpdateTagsTask task
AbstractEditor
public AbstractEditor(Icon icon)
- Constructs an
AbstractEditor with the specified icon.
AbstractEditor
public AbstractEditor(String titlePrefix)
- Constructs an
AbstractEditor with the specified title
prefix.
AbstractEditor
public AbstractEditor(Icon icon,
String titlePrefix)
- Constructs an
AbstractEditor with the specified
Icon and title prefix.
getDomainClass
public abstract Class getDomainClass()
- Returns the class used to register this instance in the UpdateManager.
- Specified by:
getDomainClass in interface Editor
getHeaderToolBar
public 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 Icon getIcon()
- Answers this
Editor's Icon.
- Specified by:
getIcon in interface Editor
getModel
public 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 String getTitle()
- Answers this
Editor's title.
- Specified by:
getTitle in interface Editor
getToolBar
public 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(Object newModel)
- Sets a new model. Does nothing if the old and new model are the same.
If the model changes, invokes
#updateView.
AZ 2010: compare object Id also.
- 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.
freeDBSearch
public void freeDBSearch()
- AZ
Perform the web service search to look for disc info.
getTitleSuffix
protected abstract 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 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 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-2010 Melloware Inc. All Rights Reserved.