|
ehsbe CommonsTM Version 1.1.0rc3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTabbedPane
com.ehsbe.commons.gui.JxTabbedPane
public class JxTabbedPane
A JTabbedPane which has a close ('X') icon on each tab. To add a tab, use the method addTab(String, Component) To have an extra icon on each tab (e.g. like in JBuilder, showing the file type) use the method addTab(String, Component, Icon). Only clicking the 'X' closes the tab.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JTabbedPane |
|---|
JTabbedPane.AccessibleJTabbedPane, JTabbedPane.ModelListener |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JTabbedPane |
|---|
changeEvent, changeListener, model, SCROLL_TAB_LAYOUT, tabPlacement, WRAP_TAB_LAYOUT |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JxTabbedPane()
Creates a new instance of JxTabbedPane |
|
| Method Summary | |
|---|---|
void |
addCloseableTabbedPaneListener(JxTabbedPaneListener l)
Adds an JxTabbedPaneListener to the tabbedpane. |
void |
addTab(String title,
Component component)
Adds a Component represented by a title and no icon. |
void |
addTab(String title,
Component component,
Icon extraIcon)
Adds a Component represented by a title and an icon. |
protected boolean |
fireCloseTab(int tabIndexToClose)
Notifies all listeners that have registered interest for notification on this event type. |
JxTabbedPaneListener[] |
getCloseableTabbedPaneListener()
Returns an array of all the SearchListeners added to this
SearchPane with addSearchListener(). |
void |
mouseClicked(MouseEvent e)
Invoked when the mouse button has been clicked (pressed and released) on a component. |
void |
mouseDragged(MouseEvent e)
Invoked when a mouse button is pressed on a component and then dragged. |
void |
mouseEntered(MouseEvent e)
Invoked when the mouse enters a component. |
void |
mouseExited(MouseEvent e)
Invoked when the mouse exits a component. |
void |
mouseMoved(MouseEvent e)
Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed. |
void |
mousePressed(MouseEvent e)
Invoked when a mouse button has been pressed on a component. |
void |
mouseReleased(MouseEvent e)
Invoked when a mouse button has been released on a component. |
void |
removeCloseableTabbedPaneListener(JxTabbedPaneListener l)
Removes an JxTabbedPaneListener from the
tabbedpane. |
void |
setCloseIcons(Icon normal,
Icon hoover,
Icon pressed)
Allows setting own closeicons. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JxTabbedPane()
JxTabbedPane
| Method Detail |
|---|
public void setCloseIcons(Icon normal,
Icon hoover,
Icon pressed)
normal - the normal closeiconhoover - the closeicon when the mouse is overpressed - the closeicon when the mouse is pressed
public void addTab(String title,
Component component)
Component represented by a title and no icon.
addTab in class JTabbedPanetitle - the title to be displayed in this tabcomponent - the component to be displayed when this tab is clicked
public void addTab(String title,
Component component,
Icon extraIcon)
Component represented by a title and an icon.
title - the title to be displayed in this tabcomponent - the component to be displayed when this tab is clickedextraIcon - the icon to be displayed in this tabpublic void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenere - the MouseEventpublic void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenere - the MouseEventpublic void mouseExited(MouseEvent e)
mouseExited in interface MouseListenere - the MouseEventpublic void mousePressed(MouseEvent e)
mousePressed in interface MouseListenere - the >MouseEventpublic void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenere - the MouseEventpublic void mouseDragged(MouseEvent e)
MOUSE_DRAGGED events will continue to be delivered to the
component where the drag originated until the mouse button is released
(regardless of whether the mouse position is within the bounds of the
component).MOUSE_DRAGGED events may not be delivered
during a native Drag&Drop operation.
mouseDragged in interface MouseMotionListenere - the MouseEventpublic void mouseMoved(MouseEvent e)
mouseMoved in interface MouseMotionListenere - the MouseEventpublic void addCloseableTabbedPaneListener(JxTabbedPaneListener l)
JxTabbedPaneListener to the tabbedpane.
l - the JxTabbedPaneListener to be addedpublic void removeCloseableTabbedPaneListener(JxTabbedPaneListener l)
JxTabbedPaneListener from the
tabbedpane.
l - the listener to be removedpublic JxTabbedPaneListener[] getCloseableTabbedPaneListener()
SearchListeners added to this
SearchPane with addSearchListener().
SearchListeners added or an empty
array if no listeners have been addedprotected boolean fireCloseTab(int tabIndexToClose)
tabIndexToClose - the index of the tab which should be closed
|
ehsbe CommonsTM Version 1.1.0rc3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||