Class DefaultTabPreviewPainter
- java.lang.Object
-
- org.pushingpixels.substance.extras.api.tabbed.TabPreviewPainter
-
- org.pushingpixels.substance.extras.api.tabbed.DefaultTabPreviewPainter
-
public class DefaultTabPreviewPainter extends TabPreviewPainter
Default implementation of the tab preview painter. The tab preview is a scaled-down (as necessary) thumbnail of the relevant tab.
-
-
Constructor Summary
Constructors Constructor Description DefaultTabPreviewPainter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasOverviewDialog(javax.swing.JTabbedPane tabPane)Checks whether the specified tabbed pane has an overview dialog.booleanhasPreview(javax.swing.JTabbedPane tabPane, int tabIndex)Checks whether the specified tab component is previewable.booleanhasPreviewWindow(javax.swing.JTabbedPane tabPane, int tabIndex)Checks whether the specified tabbed pane has a preview window for the specified tab.booleanisSensitiveToEvents(javax.swing.JTabbedPane tabPane, int tabIndex)Checks whether the specified tab component is sensitive to events.voidpreviewTab(javax.swing.JTabbedPane tabPane, int tabIndex, java.awt.image.BufferedImage bufferedImage, int x, int y, int w, int h)Draws a tab preview on the specified graphics.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from class org.pushingpixels.substance.extras.api.tabbed.TabPreviewPainter
getModalOwner, getOverviewKind, getPreviewDialogScreenBounds, getPreviewWindowDimension, getPreviewWindowExtraDelay, getUpdateCycle, toDisposeOverviewOnFocusLoss, toUpdatePeriodically
-
-
-
-
Method Detail
-
hasPreview
public boolean hasPreview(javax.swing.JTabbedPane tabPane, int tabIndex)Description copied from class:TabPreviewPainterChecks whether the specified tab component is previewable.- Overrides:
hasPreviewin classTabPreviewPainter- Parameters:
tabPane- Tabbed pane.tabIndex- Tab index for the preview paint.- Returns:
trueif the specified tab component is previewable,falseotherwise.
-
isSensitiveToEvents
public boolean isSensitiveToEvents(javax.swing.JTabbedPane tabPane, int tabIndex)Description copied from class:TabPreviewPainterChecks 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:
isSensitiveToEventsin classTabPreviewPainter- Parameters:
tabPane- Tabbed pane.tabIndex- Tab index.- Returns:
trueif the specified tab component is sensitive to events,falseotherwise.
-
previewTab
public void previewTab(javax.swing.JTabbedPane tabPane, int tabIndex, java.awt.image.BufferedImage bufferedImage, int x, int y, int w, int h)Description copied from class:TabPreviewPainterDraws a tab preview on the specified graphics.- Overrides:
previewTabin classTabPreviewPainter- Parameters:
tabPane- Tabbed pane.tabIndex- tabIndex Tab index for the preview paint.bufferedImage- Buffered image to draw the preview into.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
public boolean hasPreviewWindow(javax.swing.JTabbedPane tabPane, int tabIndex)Description copied from class:TabPreviewPainterChecks whether the specified tabbed pane has a preview window for the specified tab.- Overrides:
hasPreviewWindowin classTabPreviewPainter- Parameters:
tabPane- Tabbed pane.tabIndex- Tab index.- Returns:
trueif the specified tabbed pane has a preview window for the specified tab,falseotherwise.
-
hasOverviewDialog
public boolean hasOverviewDialog(javax.swing.JTabbedPane tabPane)
Description copied from class:TabPreviewPainterChecks whether the specified tabbed pane has an overview dialog.- Overrides:
hasOverviewDialogin classTabPreviewPainter- Parameters:
tabPane- Tabbed pane.- Returns:
trueif the specified tabbed pane has an overview dialog,falseotherwise.
-
-