public abstract class AbstractTimelineObjectEditor extends JPanel implements ITimelineObjectEditor, MouseListener, MouseMotionListener
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Modifier | Constructor and Description |
---|---|
protected |
AbstractTimelineObjectEditor(JComponent content)
Constructs a new editor, which will wrap itself around the given content.
|
protected |
AbstractTimelineObjectEditor(String title,
JComponent content)
Constructs a new editor, which will wrap itself around the given content.
|
Modifier and Type | Method and Description |
---|---|
void |
addTimelineObjectEditorListener(ITimelineObjectEditorListener l)
Adds a listener to the editor that will be informed if the user stopped
or canceled the editing from within the editor component.
|
abstract void |
cancelEditing()
Callback method for the timeline layer to indicate to the editor that the
user has canceled the editing of the timeline object.
|
protected JPanel |
createButtonBar()
Creates the button bar at the bottom of the editor (ok, cancel).
|
protected JComponent |
createHeader()
Creates and returns the component used as the header of the editor.
|
protected void |
fireEditingCanceled()
Fires an event to all listeners informing them that the editing has been
cancelled.
|
protected void |
fireEditingStopped()
Fires an event to all listeners informing them that the editing has
stopped.
|
JPanel |
getButtonBar()
Returns the button bar panel used for displaying the buttons at the
bottom of the panel.
|
JLabel |
getCloseLabel()
Returns the label, which is responsible for showing the "close" icon.
|
JComponent |
getContent()
Returns the wrapped content / editor
|
JLabel |
getPackLabel()
Returns the label, which is responsible for showing the "pack / minimize"
icon.
|
Object |
getTimelineObject()
Returns the currently edited timeline object.
|
Component |
getTimelineObjectEditorComponent(EditingLayer layer,
TimelineObjectPath path)
Returns the actual editor component for the given tree node and timeline
object.
|
Object |
getTimelineObjectPath()
Returns the path to the currently edited timeline object.
|
String |
getTitle()
Returns the title shown by the editor.
|
JLabel |
getTitleLabel()
Returns the label, which is responsible for showing the title.
|
void |
mouseClicked(MouseEvent e) |
void |
mouseDragged(MouseEvent e) |
void |
mouseEntered(MouseEvent e) |
void |
mouseExited(MouseEvent e) |
void |
mouseMoved(MouseEvent e) |
void |
mousePressed(MouseEvent e) |
void |
mouseReleased(MouseEvent e) |
protected void |
paintComponent(Graphics g) |
void |
removeTimelineObjectEditorListener(ITimelineObjectEditorListener l)
Removes a listener from the editor.
|
void |
setTitle(String title)
Sets a new title on the editor.
|
abstract boolean |
stopEditing()
Callback method for the timeline layer to indicate to the editor that the
user has finished the editing of the timeline object.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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
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
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, 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
protected AbstractTimelineObjectEditor(String title, JComponent content)
title
- the title shown inside the header of the editorcontent
- the wrapped content / editorprotected AbstractTimelineObjectEditor(JComponent content)
content
- the wrapped content / editorprotected void paintComponent(Graphics g)
paintComponent
in class JComponent
protected JPanel createButtonBar()
protected JComponent createHeader()
getTitleLabel()
,
getPackLabel()
,
getCloseLabel()
public Component getTimelineObjectEditorComponent(EditingLayer layer, TimelineObjectPath path)
ITimelineObjectEditor
getTimelineObjectEditorComponent
in interface ITimelineObjectEditor
layer
- the layer that will display the editorpath
- the path to the timeline object that will be editedpublic void addTimelineObjectEditorListener(ITimelineObjectEditorListener l)
ITimelineObjectEditor
addTimelineObjectEditorListener
in interface ITimelineObjectEditor
l
- the listener to addpublic void removeTimelineObjectEditorListener(ITimelineObjectEditorListener l)
ITimelineObjectEditor
removeTimelineObjectEditorListener
in interface ITimelineObjectEditor
l
- the listener to removeprotected void fireEditingStopped()
stopEditing()
method has been
called.stopEditing()
,
fireEditingCanceled()
protected void fireEditingCanceled()
cancelEditing()
method has
been called.stopEditing()
,
fireEditingStopped()
public abstract void cancelEditing()
ITimelineObjectEditor
cancelEditing
in interface ITimelineObjectEditor
ITimelineObjectEditor.stopEditing()
public abstract boolean stopEditing()
ITimelineObjectEditor
stopEditing
in interface ITimelineObjectEditor
ITimelineObjectEditor.cancelEditing()
public Object getTimelineObject()
public Object getTimelineObjectPath()
public JComponent getContent()
public JPanel getButtonBar()
public void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
public void mouseDragged(MouseEvent e)
mouseDragged
in interface MouseMotionListener
public void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseMotionListener
public String getTitle()
public void setTitle(String title)
title
- the new titlepublic JLabel getTitleLabel()
public JLabel getCloseLabel()
public JLabel getPackLabel()
Copyright © 2006–2016 Dirk Lemmermann Software & Consulting. All rights reserved.