org.jdesktop.swingx.plaf.basic
Class CalendarHeaderHandler
- java.lang.Object
-
- org.jdesktop.swingx.plaf.basic.CalendarHeaderHandler
-
- Direct Known Subclasses:
- BasicCalendarHeaderHandler, SpinningCalendarHeaderHandler
public abstract class CalendarHeaderHandler extends java.lang.ObjectProvides and wires a component appropriate as a calendar navigation header. The design idea is to support a pluggable header for a zoomable (PENDING JW: naming!) JXMonthView. Then custom implementations can be tailored to exactly fit their needs.To install a custom implementation, register the class name of the custom header handler with the key
CalendarHeaderHandler.uiControllerID, example:
Basic navigation action should (will) be defined by the ui delegate itself (PENDING JW: still incomplete in BasicMonthViewUI). This handler can modify/enhance them as appropriate for its context.UIManager.put(CalendarHeaderHandler.uiControllerID, "com.foo.bar.MagicHeaderHandler")PENDING JW: those icons ... who's responsible? Shouldn't we use any of the default arrows as defined in the laf anyway (are there any?)
Note: this is work-in-progress, be prepared to change if subclassing for custom requirements!
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringuiControllerID
-
Constructor Summary
Constructors Constructor and Description CalendarHeaderHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description javax.swing.JComponentgetHeaderComponent()Returns a component to be used as header in a zoomable month view, guaranteed to be not null.voidinstall(JXMonthView monthView)Installs this handler to the given month view.voiduninstall(JXMonthView monthView)Uninstalls this handler from the given target month view.
-
-
-
Field Detail
-
uiControllerID
public static final java.lang.String uiControllerID
- See Also:
- Constant Field Values
-
-
Method Detail
-
install
public void install(JXMonthView monthView)
Installs this handler to the given month view.- Parameters:
monthView- the target month view to install to.
-
uninstall
public void uninstall(JXMonthView monthView)
Uninstalls this handler from the given target month view.- Parameters:
monthView- the target month view to install from.
-
getHeaderComponent
public javax.swing.JComponent getHeaderComponent()
Returns a component to be used as header in a zoomable month view, guaranteed to be not null.- Returns:
- a component to be used as header in a zoomable JXMonthView
-
-
DataMelt 3.0 © DataMelt by jWork.ORG