Logo Search packages:      
Sourcecode: libjgoodies-looks-java version File versions  Download package

com::jgoodies::looks::plastic::PlasticTabbedPaneUI Class Reference

Inherits javax::swing::plaf::metal::MetalTabbedPaneUI.

List of all members.


Detailed Description

The JGoodies Plastic Look&Feel implementation of TabbedPaneUI. It differs from its superclass MetalTabbedPaneUI in that it paints new tab shapes, provides two options, and supports ClearLook.

You can enable or disable icons in tabs globally via com.jgoodies.looks.Options.setTabIconsEnabled(boolean).

To disable the content border set

 JTabbedPane tabbedPane = new JTabbedPane();
 tabbedPane.putClientProperty(Option.NO_CONTENT_BORDER_KEY, Boolean.TRUE);
 
To paint embedded tabs use
 JTabbedPane tabbedPane = new JTabbedPane();
 tabbedPane.putClientProperty(Option.EMBEDDED_TABS_KEY, Boolean.TRUE);
 

There's a special mode that helps you detect content borders in heavily wrapped component hierarchies - such as the NetBeans IDE. In this marked mode the content border is painted as a Magenta line. You can enable this mode by setting the System property markContentBorders to true; in a command line:

 java -DmarkContentBorders=true
 

Author:
Karsten Lentzsch

Torge Husfeldt

Andrej Golovnin

Version:
Revision
1.6

See also:
Options

Definition at line 112 of file PlasticTabbedPaneUI.java.


Public Member Functions

void installUI (JComponent c)
void paint (Graphics g, JComponent c)
int tabForCoordinate (JTabbedPane pane, int x, int y)
void uninstallUI (JComponent c)

Static Public Member Functions

static ComponentUI createUI (JComponent tabPane)

Protected Member Functions

ChangeListener createChangeListener ()
LayoutManager createLayoutManager ()
PropertyChangeListener createPropertyChangeListener ()
Insets getContentBorderInsets (int tabPlacement)
Icon getIconForTab (int tabIndex)
Insets getSelectedTabPadInsets (int tabPlacement)
Insets getTabAreaInsets (int tabPlacement)
Rectangle getTabBounds (int tabIndex, Rectangle dest)
Insets getTabInsets (int tabPlacement, int tabIndex)
int getTabLabelShiftX (int tabPlacement, int tabIndex, boolean isSelected)
int getTabLabelShiftY (int tabPlacement, int tabIndex, boolean isSelected)
int getTabRunIndent (int tabPlacement, int run)
int getTabRunOverlay (int tabPlacement)
void installComponents ()
void installKeyboardActions ()
void installListeners ()
boolean isTabInFirstRun (int tabIndex)
void layoutLabel (int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected)
void paintContentBorder (Graphics g, int tabPlacement, int selectedIndex)
void paintFocusIndicator (Graphics g, int tabPlacement, Rectangle[] rectangles, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
void paintTab (Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect)
void paintTabArea (Graphics g, int tabPlacement, int selectedIndex)
void paintTabBackground (Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
void paintTabBorder (Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
boolean shouldPadTabRun (int tabPlacement, int run)
boolean shouldRotateTabRuns (int tabPlacement)
void uninstallComponents ()
void uninstallListeners ()

Private Member Functions

Polygon createCroppedTabClip (int tabPlacement, Rectangle tabRect, int cropline)
AbstractRenderer createRenderer (JTabbedPane tabbedPane)
void doLayout ()
void embeddedTabsPropertyChanged (Boolean newValue)
void ensureCurrentLayout ()
int getClosestTab (int x, int y)
boolean hasEmbeddedTabs ()
boolean hasNoContentBorder ()
void noContentBorderPropertyChanged (Boolean newValue)
void paintCroppedTabEdge (Graphics g, int tabPlacement, int tabIndex, boolean isSelected, int x, int y)
boolean requestFocusForVisibleComponent ()
boolean scrollableTabLayoutEnabled ()
void tabPlacementChanged ()
Point translatePointToTabPanel (int srcx, int srcy, Point dest)

Private Attributes

Boolean embeddedTabs
Boolean noContentBorder
AbstractRenderer renderer
ScrollableTabSupport tabScroller
int[] xCropLen = { 1, 1, 0, 0, 1, 1, 2, 2 }
int[] yCropLen = { 0, 3, 3, 6, 6, 9, 9, 12 }

Static Private Attributes

static final int CROP_SEGMENT = 12
static boolean isTabIconsEnabled = Options.isTabIconsEnabled()

Classes

class  AbstractRenderer
class  ArrowButton
class  BottomEmbeddedRenderer
class  BottomRenderer
class  LeftEmbeddedRenderer
class  LeftRenderer
class  MyPropertyChangeHandler
class  RightEmbeddedRenderer
class  RightRenderer
class  ScrollableTabPanel
class  ScrollableTabSupport
class  ScrollableTabViewport
class  ScrollTabsBackwardAction
class  ScrollTabsForwardAction
class  TabbedPaneLayout
class  TabbedPaneScrollLayout
class  TabSelectionHandler
class  TopEmbeddedRenderer
class  TopRenderer

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index