All Packages Class Hierarchy This Package Previous Next Index
Class jclass.bwt.JCTabButton
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----jclass.bwt.JCComponent
|
+----jclass.bwt.JCLabel
|
+----jclass.bwt.JCButton
|
+----jclass.bwt.JCTabButton
- public class JCTabButton
- extends JCButton
A private class for use by a JCTabManager for its tabs.
Properties
Events
Class | Listener | Description |
JCActionEvent | addActionListener | Posted when the button is pressed and then released |
-
current_tab
- Is this the tab manager's current tab?
-
polygon
- Button's shape (may be non-rectangular).
-
JCTabButton(JCTabManager)
- Creates an empty button.
-
JCTabButton(JCTabManager, Applet, String)
- Creates a button which reads parameters from the applet's HTML file.
-
addNotify()
- If the tab manager's TabColorPolicy is BWTEnum.COLOR_PAGE,
sets the tab's color to the page's color.
-
armAction(Event)
- Sets tabManager's current tab to this button.
-
disarmAction(Event)
- Overrides JCButton's method - no action.
-
drawHighlight(Graphics, boolean)
- Draws or clears the highlight rectangle (called by paint).
-
drawRectangleShadow(Graphics)
- Draws a rectangular shadow.
-
drawShadow(Graphics)
- Draws the shadow.
-
drawSlantedShadow(Graphics)
- Draws a slanted shadow.
-
fillBackground(Graphics)
- Fills the polygon with the background color.
-
getGraphics()
- Gets a Graphics context for this component.
-
getPage()
- Gets the page for this tab.
-
getPeer()
- Gets the peer of the component.
-
gotFocus(Event, Object)
- Makes the tab visible.
-
hide()
- Hides the component.
-
inside(int, int)
- Returns true if the button is enabled and the point is inside the tab's perimeter.
-
invalidate()
-
Invalidates the component.
-
isShowing()
- Checks if this Component is showing on screen.
-
isValid()
- Checks if this Component is valid.
-
isVisible()
- Checks if this Component is visible.
-
layout()
- Lays out the label using the tabManager's alignment if no value has been set.
-
paintComponent(Graphics)
- Draws the button's label.
-
preferredWidth()
- If this tab is slanted, allow for the slant.
-
repaint(int, int, int, int)
- Repaints part of the component by calling paint directly.
-
reshape(int, int, int, int)
- Reshapes the internal polygon.
-
resize(boolean)
- Resizes the button.
-
setPage(Component)
- Sets the page for this tab.
-
show()
- Shows the component.
-
toFront()
-
-
validate()
-
Validates a component.
polygon
protected Polygon polygon
- Button's shape (may be non-rectangular).
current_tab
protected boolean current_tab
- Is this the tab manager's current tab?
JCTabButton
public JCTabButton(JCTabManager tab_manager)
- Creates an empty button.
JCTabButton
public JCTabButton(JCTabManager tab_manager,
Applet applet,
String name)
- Creates a button which reads parameters from the applet's HTML file.
- Parameters:
- tab_manager - parent JCTabManager
- applet - the applet whose PARAM tags are to be read
- name - if this is not null, only parameters preceded by this name are read
- See Also:
- getParameter
toFront
public void toFront()
inside
public boolean inside(int x,
int y)
- Returns true if the button is enabled and the point is inside the tab's perimeter.
- Overrides:
- inside in class Component
getPage
public Component getPage()
- Gets the page for this tab.
- See Also:
- setPage
setPage
public void setPage(Component page)
- Sets the page for this tab.
The page will be added to the tabManager if it is not a child.
layout
public synchronized void layout()
- Lays out the label using the tabManager's alignment if no value has been set.
- Overrides:
- layout in class JCButton
isValid
public boolean isValid()
- Checks if this Component is valid. Components are invalidated when
they are first shown on the screen.
- Overrides:
- isValid in class Component
- See Also:
- validate, invalidate
isShowing
public boolean isShowing()
- Checks if this Component is showing on screen. This means that the
component must be visible, and it must be in a container that is
visible and showing.
- Overrides:
- isShowing in class Component
- See Also:
- show, hide
show
public synchronized void show()
- Shows the component.
- Overrides:
- show in class Component
- See Also:
- isVisible, hide
hide
public synchronized void hide()
- Hides the component.
- Overrides:
- hide in class Component
- See Also:
- isVisible, hide
getPeer
public ComponentPeer getPeer()
- Gets the peer of the component.
- Overrides:
- getPeer in class Component
validate
public void validate()
- Validates a component.
- Overrides:
- validate in class JCComponent
invalidate
public void invalidate()
- Invalidates the component. The component and all parents
above it are marked as needing to be laid out.
- Overrides:
- invalidate in class Component
isVisible
public boolean isVisible()
- Checks if this Component is visible. Components are initially visible
(with the exception of top level components such as Frame).
- Overrides:
- isVisible in class Component
- See Also:
- show, hide
addNotify
public void addNotify()
- If the tab manager's TabColorPolicy is BWTEnum.COLOR_PAGE,
sets the tab's color to the page's color.
- Overrides:
- addNotify in class JCLabel
preferredWidth
protected int preferredWidth()
- If this tab is slanted, allow for the slant.
- Overrides:
- preferredWidth in class JCButton
fillBackground
protected void fillBackground(Graphics gc)
- Fills the polygon with the background color.
- Overrides:
- fillBackground in class JCComponent
paintComponent
protected synchronized void paintComponent(Graphics gc)
- Draws the button's label.
- Overrides:
- paintComponent in class JCLabel
drawShadow
protected void drawShadow(Graphics gc)
- Draws the shadow.
- Overrides:
- drawShadow in class JCComponent
getGraphics
public Graphics getGraphics()
- Gets a Graphics context for this component.
- Overrides:
- getGraphics in class Component
drawHighlight
protected void drawHighlight(Graphics gc,
boolean on)
- Draws or clears the highlight rectangle (called by paint).
- Parameters:
- on - if true, draws the highlight rectangle and a dashed rectangle
around the label; otherwise clears the rect
- Overrides:
- drawHighlight in class JCButton
drawRectangleShadow
protected void drawRectangleShadow(Graphics gc)
- Draws a rectangular shadow.
drawSlantedShadow
protected void drawSlantedShadow(Graphics gc)
- Draws a slanted shadow.
reshape
public synchronized void reshape(int x,
int y,
int width,
int height)
- Reshapes the internal polygon.
- Overrides:
- reshape in class JCComponent
repaint
public synchronized void repaint(int x,
int y,
int width,
int height)
- Repaints part of the component by calling paint directly.
- Overrides:
- repaint in class JCComponent
resize
protected void resize(boolean current)
- Resizes the button.
- Parameters:
- current - whether this is the tabManager's current tab; if true,
the tab will grow by its shadow thickness; otherwise it will shrink.
gotFocus
public boolean gotFocus(Event ev,
Object what)
- Makes the tab visible.
- Overrides:
- gotFocus in class JCComponent
- See Also:
- makeTabVisible
armAction
public void armAction(Event ev)
- Sets tabManager's current tab to this button.
- Overrides:
- armAction in class JCButton
disarmAction
public void disarmAction(Event ev)
- Overrides JCButton's method - no action.
- Overrides:
- disarmAction in class JCButton
All Packages Class Hierarchy This Package Previous Next Index