com.miginfocom.calendar.datearea
Class ThemeDateArea

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by com.miginfocom.calendar.datearea.DefaultDateArea
                  extended by com.miginfocom.calendar.datearea.ThemeDateArea
All Implemented Interfaces:
InteractionListener, DateArea, DateGridContainer, DateGridProvider, GridContainer, GridLayoutProvider, GridLineSpecProvider, SubRowCreator, ActivityLayoutBroker, DateChangeListener, TimeSpanListListener, java.awt.event.HierarchyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener

public class ThemeDateArea
extends DefaultDateArea

A date area that will take it's settings from a CalendarTheme.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.miginfocom.calendar.datearea.DefaultDateArea
DefaultDateArea.ActivityViewDecorator, DefaultDateArea.MultiSelectRectangleDecorator, DefaultDateArea.StateOrderComparator
 
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
protected  java.lang.String themeContext
          The com.miginfocom.theme context used in this and overriding classes.
 
Fields inherited from class com.miginfocom.calendar.datearea.DefaultDateArea
AE_CLICKED, AE_DOUBLE_CLICKED, AE_DRAG_PRESSED, AE_MOUSE_ENTERED, AE_MOUSE_EXITED, AE_MOUSE_RELEASED, AE_POPUP_TRIGGER, AE_RESIZE_END_PRESSED, AE_RESIZE_START_PRESSED, AE_SELECTED_PRESSED, decoratorSupport, DEFAULT_ACTIVITY_VIEW_LAYER_INDEX, DEFAULT_MULTI_SELECT_RECTANGLE_LAYER_INDEX, NO_FIT_EVENT_PROPERTY
 
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 com.miginfocom.calendar.datearea.DateArea
SELECTION_TYPE_NONE, SELECTION_TYPE_NORMAL
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ThemeDateArea()
          Constructor.
ThemeDateArea(java.lang.String themeContext)
          Constructor.
 
Method Summary
 GridDimensionLayout createLayout(Grid grid, int dimIx)
          Creates a new GridDimensionLayout.
 GridLineSpecification createSpecification(DateArea dateArea)
          Creates a new GridLineProvider.
 java.lang.String getThemeContext()
          Returns the current com.miginfocom.theme context
protected  void paintComponent(java.awt.Graphics g)
          Overridden to paint a debug outline if specified in the com.miginfocom.theme
 void propertyChange(java.beans.PropertyChangeEvent e)
           
 void recreateAll()
          Reload properties from theme, recreates the grid and activity layouts.
 void reloadFromTheme()
          Reload values regarding the date area from the com.miginfocom.theme and set them in the super class.
 void reloadStartupStructureFromTheme()
          Reload startup values from com.miginfocom.theme and set in super class.
 void repaint(long t, int x, int y, int w, int h)
          Overridden to enable a possible expansion of the repainted area.
 void setThemeContext(java.lang.String newContext)
          Set the current com.miginfocom.theme context
 
Methods inherited from class com.miginfocom.calendar.datearea.DefaultDateArea
addActivityDragResizeListener, addActivityDragResizeListener, addActivityLayout, addActivityMoveListener, addActivityMoveListener, addDateChangeListener, addDateChangeListener, addDecorator, addDecorators, addGridListener, addGridListener, addInteractionListener, addInteractionListener, clearSelectableRange, clearSelectedRange, createDateGrid, createScrollPane, createSubRows, cycleActivityViewSelection, dateRangeChanged, doLayout, drawMultiSelectRectangle, fireActivityDragResizeChange, fireActivityPreMoveEvent, fireDateChange, fireGridChanged, fireInteractionOccured, getActivityDepositoryContext, getActivityLayoutBroker, getActivityLayoutDelay, getActivityLayouts, getActivityRecreateDelay, getActivityViewAt, getActivityViewFilter, getActivityViewLayerIndex, getActivityViewRenderer, getActivityViews, getActViewEventOrderComparator, getActViewLayoutOrderComparator, getActViewPaintOrderComparator, getBackgroundPaint, getBackgroundPaintViewport, getBoundingRect, getComponent, getDateGrid, getDateGridProvider, getDateRangeForPoint, getDateRangeSelection, getDecorators, getDefaultCursor, getDefaultNoFitShape, getExpandDateRangeKeySequence, getExpectedCellCount, getFallbackSnapToMillis, getGraphicsConfigurationForPoint, getGrid, getGridLayoutProvider, getGridLineSpecProvider, getLayoutDelayFromOther, getLayoutOptimizeBoundary, getMaximumSize, getMinimumSize, getMultiRectSelectKeySequence, getMultiSelectKeySequence, getMultiSelectRectangleLayerIndex, getNoFitDateRanges, getNoSnapKeySequence, getOuterBorder, getPreferredSize, getPrimaryDimension, getPrimaryDimensionCellType, getPrimaryDimensionCellTypeCount, getRepaintCellExpand, getRowFilters, getScrollPane, getSecondaryDimension, getSelectableRange, getSelectDateRangeKeySequence, getSelectedRange, getSelectionRounder, getSelectionType, getSnapToMillis, getStateHandler, getSubGridRowCreator, getSubGridRowLayout, getSubRowCreator, getToolTipProvider, getUseVisibilityOptimizations, getVisibleDateRange, getVisibleDateRangeCorrected, getVisibleDateRangeString, getWrapBoundary, getWrapBoundaryCount, hideTooltip, hierarchyChanged, interactionOccured, invalidateGrid, isActivitiesSupported, isMultiSelectLive, isSelectable, layoutActivityViews, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, multiSelectActivities, paintActivities, paintBackground, print, processEvent, recreateActivityViews, removeActivityDragResizeListener, removeActivityLayout, removeActivityMoveListener, removeDateChangeListener, removeDecorator, removeDecorator, removeDecorators, removeDecorators, removeGridListener, removeInteractionListener, revalidateGridDimensionLayout, setActivitiesSupported, setActivityDepositoryContext, setActivityLayoutBroker, setActivityLayoutDelay, setActivityLayouts, setActivityRecreateDelay, setActivityViewFilter, setActivityViewLayerIndex, setActivityViewRenderer, setActViewEventOrderComparator, setActViewLayoutOrderComparator, setActViewPaintOrderComparator, setBackgroundPaint, setBackgroundPaintViewport, setDateGridProvider, setDateRangeSelection, setDebugMessage, setDecorators, setDefaultCursor, setDefaultNoFitShape, setExpandDateRangeKeySequence, setFallbackSnapToMillis, setGridLayoutProvider, setGridLineSpecProvider, setGridSize, setLayoutDelayFromOther, setLayoutOptimizeBoundary, setMultiRectSelectKeySequence, setMultiSelectCorners, setMultiSelectKeySequence, setMultiSelectLive, setMultiSelectRectangleLayerIndex, setNoSnapKeySequence, setOuterBorder, setPrimaryDimension, setPrimaryDimensionCellType, setPrimaryDimensionCellTypeCount, setPrimaryDimensionRowSizesStatic, setRepaintCellExpand, setRowFilters, setSecondaryDimensionRowSizesStatic, setSelectableRange, setSelectDateRangeKeySequence, setSelectedRange, setSelectionRounder, setSelectionType, setSnapToMillis, setStateHandler, setSubGridRowCreator, setSubGridRowLayout, setSubRowCreator, setToolTipProvider, setUseVisibilityOptimizations, setVisibleDateRange, setVisibleDateRangeString, setWrapBoundary, setWrapBoundaryCount, sortDecorators, splitByLayout, timeSpanListChanged, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, 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, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, 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, 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, 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
 

Field Detail

themeContext

protected java.lang.String themeContext
The com.miginfocom.theme context used in this and overriding classes.

Constructor Detail

ThemeDateArea

public ThemeDateArea()
Constructor. If using s null com.miginfocom.theme context.


ThemeDateArea

public ThemeDateArea(java.lang.String themeContext)
Constructor.

Parameters:
themeContext - Theme context to get a CalendarTheme or if it doesn't exist a new one is created with the default setting.
Method Detail

reloadStartupStructureFromTheme

public void reloadStartupStructureFromTheme()
Reload startup values from com.miginfocom.theme and set in super class.


reloadFromTheme

public void reloadFromTheme()
Reload values regarding the date area from the com.miginfocom.theme and set them in the super class.


recreateAll

public void recreateAll()
Reload properties from theme, recreates the grid and activity layouts. Also lays out the activities.

See Also:
reloadStartupStructureFromTheme(), reloadFromTheme(), DefaultDateArea.invalidateGrid()

getThemeContext

public java.lang.String getThemeContext()
Returns the current com.miginfocom.theme context

Returns:
The current com.miginfocom.theme context, may be null.
See Also:
Theme

setThemeContext

public void setThemeContext(java.lang.String newContext)
Set the current com.miginfocom.theme context

Parameters:
newContext - The new current com.miginfocom.theme context
See Also:
Theme

paintComponent

protected void paintComponent(java.awt.Graphics g)
Overridden to paint a debug outline if specified in the com.miginfocom.theme

Overrides:
paintComponent in class DefaultDateArea

repaint

public void repaint(long t,
                    int x,
                    int y,
                    int w,
                    int h)
Description copied from class: DefaultDateArea
Overridden to enable a possible expansion of the repainted area.

Overrides:
repaint in class DefaultDateArea
Parameters:
t - Time sent to super method unchanged.
x - The x position rectangle that is about to be painted.
y - The y position rectangle that is about to be painted.
w - The width of the rectangle that is about to be painted.
h - The height of the rectangle that is about to be painted.

createLayout

public GridDimensionLayout createLayout(Grid grid,
                                        int dimIx)
Description copied from interface: GridLayoutProvider
Creates a new GridDimensionLayout.

Specified by:
createLayout in interface GridLayoutProvider
Overrides:
createLayout in class DefaultDateArea
Parameters:
grid - The grid used to get information.
dimIx - The dimension. Either Grid.PRIMARY_DIMENSION or Grid.SECONDARY_DIMENSION
Returns:
The layout that will be used to layout a Grid.

createSpecification

public GridLineSpecification createSpecification(DateArea dateArea)
Description copied from interface: GridLineSpecProvider
Creates a new GridLineProvider.

Specified by:
createSpecification in interface GridLineSpecProvider
Overrides:
createSpecification in class DefaultDateArea
Parameters:
dateArea - The date area to get information from.
Returns:
The spec that hold the grid lines to be used for creating a Grid.

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent e)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Overrides:
propertyChange in class DefaultDateArea


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.