org.gnu.gtk
public class Notebook extends Container
Deprecated: This class is part of the java-gnome 2.x family of libraries,
which, due to their inefficiency and complexity, are no longer
being maintained and have been abandoned by the java-gnome
project. This class may in the future have an equivalent in
java-gnome 4.0, try looking for
org.gnome.gtk.Notebook
.
You should be aware that there is a considerably different API
in the new library: the architecture is completely different
and most notably internals are no longer exposed to public view.
There are many configuration options for a Notebook. Among other things you can choose on which edge the tabs appear, whether, if there are too many tabs to fit th notebook should be made bigger or scrolling arrows added, and whether there will be a popup menu allowing the user to switch between pages.
Constructor Summary | |
---|---|
Notebook()
Construct a new Notebook object with no pages. | |
Notebook(Handle handle)
Construct a new Notebook from a handle to a native resource. |
Method Summary | |
---|---|
void | addListener(NotebookListener listener)
Register an object to receive event notification.
|
void | appendPage(Widget child, Widget tabLabel)
Append a page to the Notebook.
|
void | appendPage(Widget child, Widget tabLabel, Widget menuLabel)
Append a page to the Notebook.
|
int | getCurrentPage()
Returns the page number of the current page. |
Class | getEventListenerClass(String signal) |
EventType | getEventType(String signal) |
static Notebook | getNotebook(Handle handle)
Internal static factory method to be used by Java-Gnome only. |
int | getNumPages()
Return the number of pages currently on the notebook. |
Widget | getPage(int pageNum)
Returns the child Widget contained int he page number
pageNum . |
String | getTabLabelText(Widget child)
Retrieves the text of the tab label for the page containing child.
|
static Type | getType()
Retrieve the runtime type used by the GLib library. |
void | insertPage(Widget child, Widget tabLabel, int position)
Insert a page into the Notebook at the given position.
|
void | insertPage(Widget child, Widget tabLabel, Widget menuLabel, int position)
Insert a page into the Notebook at the given position.
|
void | nextPage()
Switches to the next page. |
int | pageNum(Widget child)
Finds the index of the page which contains the given child.
|
void | popupDisable()
disables the popup menu. |
void | popupEnable()
Enables the popup menu. |
void | prependPage(Widget child, Widget tabLabel)
Prepend a page to the Notebook.
|
void | prependPage(Widget child, Widget tabLabel, Widget menuLabel)
Prepend a page to the Notebook.
|
void | prevPage()
Switches to the previous page. |
void | removeListener(NotebookListener listener)
Unregister an object that was receiving notebook event notification.
|
void | removePage(int pageNumber)
Removes a page fro the Notegook given its index in the notebook.
|
void | reorderChild(Widget child, int position)
Reorders the page containing child , so that it appears in
position position. |
void | setCurrentPage(int pageNum)
sets the page at offset pageNum to the current page. |
void | setMenuLabel(Widget child, Widget menuLabel)
Changes the menu label for the page containing child . |
void | setMenuLabel(Widget child, String menuText)
Creates a new label and sets it as the menu label of child . |
void | setScrollable(boolean scrollable)
Sets whether the tab label area will have arrows for scrolling if there
are too many tabs to fit in the area. |
void | setShowBorder(boolean showBorder)
Sets whether a bevel will be drawn around the notebook pages. |
void | setShowTabs(boolean showTabs)
sets whether to show the tabs for the notebook or not. |
void | setTabLabel(Widget child, Widget tabLabel)
Changes the tab label for child . |
void | setTabLabel(Widget child, String tabText)
Creates a new label and sets it as the label of the page containing
child . |
void | setTabLabelPacking(Widget child, boolean expand, boolean fill, PackType packType)
Sets the packing parameters for the tab label of the page containing
child .
|
void | setTabPosition(PositionType pos)
Sets the edge at which the tabs for switching pages in the Notebook are
drawn. |
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Construct a new Notebook object with no pages.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Construct a new Notebook from a handle to a native resource.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Register an object to receive event notification.Parameters: listener The object that has implemented the NotebookListener interface that is to receive the notebook events.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Append a page to the Notebook.Parameters: child
The child widget to add to the newly created page. tabLabel
The Widget to be used as the label for the page or
null
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Append a page to the Notebook.Parameters: child
The child widget to add to the newly created page. tabLabel
The Widget to be used as the label for the page or
null
menuLabel The widget to use as a label for the page-switching menu, if that is
enabled. If null
and tabLabel
is a Label or null
then the menu label will be a newly created label with the same text as the tabLabel
.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns the page number of the current page. If the notebook has no pages, then -1 will be returned.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Internal static factory method to be used by Java-Gnome only.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Return the number of pages currently on the notebook.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns the child Widget contained int he page numberpageNum
.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Retrieves the text of the tab label for the page containing child.Parameters: child a widget contained in a page of notebook
Returns: value: the text of the tab label, or NULL if the tab label widget is not a Label.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Retrieve the runtime type used by the GLib library.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Insert a page into the Notebook at the given position.Parameters: child
The child widget to add to the newly created page. tabLabel
The Widget to be used as the label for the page or
null
position The index (starting at 0) at which to insert the page.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Insert a page into the Notebook at the given position.Parameters: child
The child widget to add to the newly created page. tabLabel
The Widget to be used as the label for the page or
null
menuLabel The widget to use as a label for the page-switching menu, if that is
enabled. If null
and tabLabel
is a Label or null
then the menu label will be a newly created label with the same text as the tabLabel
. position The index (starting at 0) at which to insert the page.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Switches to the next page. Nothing happens if the current page is the last page.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Finds the index of the page which contains the given child.Parameters: child The widget to locate.
Returns: The index of the page which contains the given child.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
disables the popup menu.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Enables the popup menu.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Prepend a page to the Notebook.Parameters: child
The child widget to add to the newly created page. tabLabel
The Widget to be used as the label for the page or
null
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Prepend a page to the Notebook.Parameters: child
The child widget to add to the newly created page. tabLabel
The Widget to be used as the label for the page or
null
menuLabel The widget to use as a label for the page-switching menu, if that is
enabled. If null
and tabLabel
is a Label or null
then the menu label will be a newly created label with the same text as the tabLabel
.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Switches to the previous page. Nothing happens if the current page is the first page.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Unregister an object that was receiving notebook event notification.Parameters: listener The object that is to no longer receive notebook events.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Removes a page fro the Notegook given its index in the notebook.Parameters: pageNumber The offset (starting with 0) for the page to remove.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Reorders the page containingchild
, so that it appears in
position position. If position
is greater
than or equal to the number of children in the list or negative, child
will be moved to the end of the list.
Parameters: child The widget to move. position The index (starting with 0) to move the child.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
sets the page at offsetpageNum
to the current page.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Changes the menu label for the page containingchild
.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Creates a new label and sets it as the menu label ofchild
.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets whether the tab label area will have arrows for scrolling if there are too many tabs to fit in the area.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets whether a bevel will be drawn around the notebook pages.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
sets whether to show the tabs for the notebook or not.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Changes the tab label forchild
.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Creates a new label and sets it as the label of the page containingchild
.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets the packing parameters for the tab label of the page containingchild
.
See Also: Box
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets the edge at which the tabs for switching pages in the Notebook are drawn.