Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## echopointng.tabbedpane
Class DefaultTabImageRenderer

    java.lang.Object
      echopointng.tabbedpane.DefaultTabImageRenderer

All Implemented Interfaces:
  TabImageRenderer, java.io.Serializable

    public class DefaultTabImageRenderer

extends java.lang.Object
implements TabImageRenderer, java.io.Serializable

`DefaultTabImageRenderer` is a default implementation of `TabImageRenderer` that uses a "background template image" and TextImageReference to return "dynamic" tab image representations.

See Also:
  Serialized Form

Field Summary
`static Insets` | `DEFAULT_INSETS` The default insets used by the DefaultTabImageRenderer

Constructor Summary
`DefaultTabImageRenderer()` Constructs a `DefaultTabImageRenderer` with default background tab images.
`DefaultTabImageRenderer(java.awt.Image activeTabImage, java.awt.Image inactiveTabImage)` Constructs a `DefaultTabImageRenderer` with the specified background tab images.

Method Summary
`java.awt.Image` | `getActiveTabImage()` Returns the current active tab java.awt.Image
`Color` | `getImageBorderColor()` This is called the indicate the color of any border around the image.
`int` | `getImageBorderWidth()` This is called the indicate the width of any border around the image.
`java.awt.Image` | `getInactiveTabImage()` Returns the current inactive tab java.awt.Image
`Insets` | `getInsets()` Returns the image insets that will be appplied to any TextImageReferences returned.
`static DefaultTabImageRenderer` | `getInstance()` This helper method will construct a DefaultTabImageRenderer with default colors of 0xC0C0C0 for the active tabs, 0xE0E0E0 for the inactive tabs and a border color of 0x000000 and a tab placement of Alignment.TOP
`static DefaultTabImageRenderer` | `getInstance(Color activeTabColor, Color inactiveTabColor, Color borderColor, int tabPlacement)` This helper method will construct a DefaultTabImageRenderer using some template background images.
`static DefaultTabImageRenderer` | `getInstance(int tabPlacement)` This helper method will construct a DefaultTabImageRenderer with default colors of 0xC0C0C0 for the active tabs, 0xE0E0E0 for the inactive tabs and a border color of 0x000000.
`ImageReference` | `getLeadInImage()` Returns the current lead in ImageReference
`ImageReference` | `getLeadInImage(TabbedPane tp)` This returns a "lead in" image that will be place to the left of all tab images.
`ImageReference` | `getLeadOutImage()` Returns the current lead out ImageReference
`ImageReference` | `getLeadOutImage(TabbedPane tp)` This returns a "lead out" image that will be place to the right of all tab images.
`ImageReference` | `getTabImage(TabbedPane tp, int tabIndex, Component tabComponent, boolean isSelected)` This returns an ImageReference to be used as the tab's representation.
`void` | `prime(TabbedPane tp)` This will set properties in the TabbedPane that are sutiable for this TabImageRenderer.
`void` | `setActiveTabImage(java.awt.Image image)` Sets the java.awt.Image to be used as a background for active tabs.
`void` | `setBorderColor(Color color)` Sets the border color that may be around any of the tab images
`void` | `setBorderWidth(int i)` Sets the border width that may be around any of the tab images
`void` | `setInactiveTabImage(java.awt.Image image)` Sets the java.awt.Image to be used as a background for inactive tabs.
`void` | `setInsets(Insets insets)` Sets the image insets that will be appplied to aby TextImageReferences returned.
`void` | `setLeadInImage(ImageReference reference)` Sets the ImageReference to be used for the lead in image
`void` | `setLeadOutImage(ImageReference reference)` Sets the ImageReference to be used for the lead out image

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_INSETS

    public static final Insets DEFAULT_INSETS

  The default insets used by the DefaultTabImageRenderer

Constructor Detail

### DefaultTabImageRenderer

    public DefaultTabImageRenderer()

  Constructs a `DefaultTabImageRenderer` with default background tab images.

### DefaultTabImageRenderer

    public DefaultTabImageRenderer(java.awt.Image activeTabImage,
                                   java.awt.Image inactiveTabImage)

  Constructs a `DefaultTabImageRenderer` with the specified background tab images. The leadIn andleadOut ImageReferences will be null.

  Parameters:
    `activeTabImage` - - the java.awt.Image to be used for active tabs
    `inactiveTabImage` - - the java.awt.Image to be used for inactive tabs

Method Detail

### getLeadInImage

    public ImageReference getLeadInImage(TabbedPane tp)

  Description copied from interface: `TabImageRenderer`
  This returns a "lead in" image that will be place to the left of all tab images. If there is no lead in image, then this method should return null.

  Specified by:
    `getLeadInImage` in interface `TabImageRenderer`
  Parameters:
    `tp` - the TabbedPane in question
  Returns:
    the lead in image or null if there isnt one
  See Also:
    `TabImageRenderer.getLeadInImage(echopointng.TabbedPane)`

### getLeadOutImage

    public ImageReference getLeadOutImage(TabbedPane tp)

  Description copied from interface: `TabImageRenderer`
  This returns a "lead out" image that will be place to the right of all tab images. If there is no lead out image, then this method should return null.

  Specified by:
    `getLeadOutImage` in interface `TabImageRenderer`
  Parameters:
    `tp` - the TabbedPane in question
  Returns:
    the lead out image or null if there isnt one
  See Also:
    `TabImageRenderer.getLeadOutImage(echopointng.TabbedPane)`

### getTabImage

    public ImageReference getTabImage(TabbedPane tp,
                                      int tabIndex,
                                      Component tabComponent,
                                      boolean isSelected)

  Description copied from interface: `TabImageRenderer`
  This returns an ImageReference to be used as the tab's representation.

  This MUST NOT be null since the TabbedPane requires an image if a TabImageRenderer is in use.

  Specified by:
    `getTabImage` in interface `TabImageRenderer`
  Parameters:
    `tp` - the TabbedPane in question
    `tabIndex` - - the index of the tab
    `tabComponent` - - the component that represents the tab at `index`
    `isSelected` - - true if the tab is the selected one
  Returns:
    the `ImageReference` to use as the tab image. This must NOT be null.
  See Also:
    `TabImageRenderer.getTabImage(echopointng.TabbedPane, int, nextapp.echo2.app.Component, boolean)`

### getImageBorderWidth

    public int getImageBorderWidth()

  Description copied from interface: `TabImageRenderer`
  This is called the indicate the width of any border around the image. This is used by the TabbedPane to decide whether to place a 3 sided border under the provided images.

  Specified by:
    `getImageBorderWidth` in interface `TabImageRenderer`
  Returns:
    the width of any border around the images. Can be zero!
  See Also:
    `TabImageRenderer.getImageBorderWidth()`

### getImageBorderColor

    public Color getImageBorderColor()

  Description copied from interface: `TabImageRenderer`
  This is called the indicate the color of any border around the image. This is used by the TabbedPane to decide whether to place a 3 sided border under the provided images.

  Specified by:
    `getImageBorderColor` in interface `TabImageRenderer`
  Returns:
    the color of any border around the images. Can be null!
  See Also:
    `TabImageRenderer.getImageBorderColor()`

### getActiveTabImage

    public java.awt.Image getActiveTabImage()

  Returns the current active tab java.awt.Image

  Returns:
    the current active tab java.awt.Image

### getInactiveTabImage

    public java.awt.Image getInactiveTabImage()

  Returns the current inactive tab java.awt.Image

  Returns:
    the current inactive tab java.awt.Image

### getLeadInImage

    public ImageReference getLeadInImage()

  Returns the current lead in ImageReference

  Returns:
    the current lead in ImageReference

### getLeadOutImage

    public ImageReference getLeadOutImage()

  Returns the current lead out ImageReference

  Returns:
    the current lead out ImageReference

### setActiveTabImage

    public void setActiveTabImage(java.awt.Image image)

  Sets the java.awt.Image to be used as a background for active tabs.

  Parameters:
    `image` - - the java.awt.Image to be used as a background for active tabs

### setInactiveTabImage

    public void setInactiveTabImage(java.awt.Image image)

  Sets the java.awt.Image to be used as a background for inactive tabs.

  Parameters:
    `image` - - the java.awt.Image to be used as a background for inactive tabs

### setLeadInImage

    public void setLeadInImage(ImageReference reference)

  Sets the ImageReference to be used for the lead in image

  Parameters:
    `reference` - the ImageReference to be used for the lead in image

### setLeadOutImage

    public void setLeadOutImage(ImageReference reference)

  Sets the ImageReference to be used for the lead out image

  Parameters:
    `reference` - the ImageReference to be used for the lead out image

### getInsets

    public Insets getInsets()

  Returns the image insets that will be appplied to any TextImageReferences returned.

  Returns:
    the image insets

### setInsets

    public void setInsets(Insets insets)

  Sets the image insets that will be appplied to aby TextImageReferences returned.

  Parameters:
    `insets` -

### setBorderColor

    public void setBorderColor(Color color)

  Sets the border color that may be around any of the tab images

  Parameters:
    `color` - - the border color that may be around any of the tab images

### setBorderWidth

    public void setBorderWidth(int i)

  Sets the border width that may be around any of the tab images

  Parameters:
    `i` - - the border width that may be around any of the tab images

### prime

    public void prime(TabbedPane tp)

  This will set properties in the TabbedPane that are sutiable for this TabImageRenderer. This can include things like border color, active background and inactive background colors, and tab placement.

  This method is best used if you created the DefaultTabImageRenderer with the getInstance() methods.

  Parameters:
    `tp` - the TabbedPane to be primed with values

### getInstance

    public static DefaultTabImageRenderer getInstance()

  This helper method will construct a DefaultTabImageRenderer with default colors of 0xC0C0C0 for the active tabs, 0xE0E0E0 for the inactive tabs and a border color of 0x000000 and a tab placement of Alignment.TOP

  Returns:
    a primed DefaultTabImageRenderer

### getInstance

    public static DefaultTabImageRenderer getInstance(int tabPlacement)

  This helper method will construct a DefaultTabImageRenderer with default colors of 0xC0C0C0 for the active tabs, 0xE0E0E0 for the inactive tabs and a border color of 0x000000. You need to specifiy the tab placement.

  Parameters:
    `tabPlacement` - - can be EchoConstants.TOP or EchoConstants.BOTTOM
  Returns:
    a primed DefaultTabImageRenderer

### getInstance

    public static DefaultTabImageRenderer getInstance(Color activeTabColor,
                                                      Color inactiveTabColor,
                                                      Color borderColor,
                                                      int tabPlacement)

  This helper method will construct a DefaultTabImageRenderer using some template background images. The template images have a 1 pixel border, rounded edges and a transparent side. This method will "transform" the default template images to match the colors provided.

  Parameters:
    `activeTabColor` - - the desired active tab color
    `inactiveTabColor` - - the desired inactive tab color
    `borderColor` - - the desired border color
    `tabPlacement` - - can be EchoConstants.TOP or EchoConstants.BOTTOM
  Returns:
    a primed DefaultTabImageRenderer

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD