Class DefaultTabPreviewPainter
java.lang.Object
org.pushingpixels.lafwidget.tabbed.TabPreviewPainter
org.pushingpixels.lafwidget.tabbed.DefaultTabPreviewPainter
Default implementation of the tab preview painter. The tab preview is a
scaled-down (as necessary) thumbnail of the relevant tab.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
hasOverviewDialog
(JTabbedPane tabPane) Checks whether the specified tabbed pane has an overview dialog.boolean
hasPreview
(JTabbedPane tabPane, int tabIndex) Checks whether the specified tab component is previewable.boolean
hasPreviewWindow
(JTabbedPane tabPane, int tabIndex) Checks whether the specified tabbed pane has a preview window for the specified tab.boolean
isSensitiveToEvents
(JTabbedPane tabPane, int tabIndex) Checks whether the specified tab component is sensitive to events.void
previewTab
(JTabbedPane tabPane, int tabIndex, Graphics g, int x, int y, int w, int h) Draws a tab preview on the specified graphics.Methods inherited from class org.pushingpixels.lafwidget.tabbed.TabPreviewPainter
getModalOwner, getOverviewKind, getPreviewDialogScreenBounds, getPreviewWindowDimension, getPreviewWindowExtraDelay, getUpdateCycle, toDisposeOverviewOnFocusLoss, toUpdatePeriodically
-
Constructor Details
-
DefaultTabPreviewPainter
public DefaultTabPreviewPainter()
-
-
Method Details
-
hasPreview
Description copied from class:TabPreviewPainter
Checks whether the specified tab component is previewable.- Overrides:
hasPreview
in classTabPreviewPainter
- Parameters:
tabPane
- Tabbed pane.tabIndex
- Tab index for the preview paint.- Returns:
true
if the specified tab component is previewable,false
otherwise.
-
isSensitiveToEvents
Description copied from class:TabPreviewPainter
Checks whether the specified tab component is sensitive to events. Overriding implementation may decide that disabled tabs do not respond to mouse and keyboard events, thus not allowing selecting the corresponding tab.- Overrides:
isSensitiveToEvents
in classTabPreviewPainter
- Parameters:
tabPane
- Tabbed pane.tabIndex
- Tab index.- Returns:
true
if the specified tab component is sensitive to events,false
otherwise.
-
previewTab
Description copied from class:TabPreviewPainter
Draws a tab preview on the specified graphics.- Overrides:
previewTab
in classTabPreviewPainter
- Parameters:
tabPane
- Tabbed pane.tabIndex
- tabIndex Tab index for the preview paint.g
- Graphics context.x
- X coordinate of the preview area.y
- Y coordinate of the preview area.w
- Width of the preview area.h
- Height of the preview area.
-
hasPreviewWindow
Description copied from class:TabPreviewPainter
Checks whether the specified tabbed pane has a preview window for the specified tab.- Overrides:
hasPreviewWindow
in classTabPreviewPainter
- Parameters:
tabPane
- Tabbed pane.tabIndex
- Tab index.- Returns:
true
if the specified tabbed pane has a preview window for the specified tab,false
otherwise.
-
hasOverviewDialog
Description copied from class:TabPreviewPainter
Checks whether the specified tabbed pane has an overview dialog.- Overrides:
hasOverviewDialog
in classTabPreviewPainter
- Parameters:
tabPane
- Tabbed pane.- Returns:
true
if the specified tabbed pane has an overview dialog,false
otherwise.
-