addListener
public void addListener(NotebookListener listener)
Register an object to receive event notification.
listener
- The object that has implemented the
NotebookListener interface that is to receive the notebook events.
appendPage
public void appendPage(Widget child,
Widget tabLabel)
Append a page to the Notebook.
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
appendPage
public void appendPage(Widget child,
Widget tabLabel,
Widget menuLabel)
Append a page to the Notebook.
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
.
fireNotebookEvent
protected void fireNotebookEvent(NotebookEvent event)
getCurrentPage
public int getCurrentPage()
Returns the page number of the current page.
getEventListenerClass
public Class getEventListenerClass(String signal)
- getEventListenerClass in interface Container
getEventType
public EventType getEventType(String signal)
- getEventType in interface Container
getNumPages
public int getNumPages()
Return the number of pages currently on the notebook.
getPage
public Widget getPage(int pageNum)
Returns the child Widget contained int he page number pageNum
.
getType
public static Type getType()
Retrieve the runtime type used by the GLib library.
- getType in interface Container
gtk_notebook_append_page
protected static final void gtk_notebook_append_page(Handle notebook,
Handle child,
Handle tabLabel)
gtk_notebook_append_page_menu
protected static final void gtk_notebook_append_page_menu(Handle notebook,
Handle child,
Handle tabLabel,
Handle menuLabel)
gtk_notebook_get_current_page
protected static final int gtk_notebook_get_current_page(Handle notebook)
gtk_notebook_get_menu_label
protected static final Handle gtk_notebook_get_menu_label(Handle notebook,
Handle child)
gtk_notebook_get_menu_label_text
protected static final String gtk_notebook_get_menu_label_text(Handle notebook,
Handle child)
gtk_notebook_get_n_pages
protected static final int gtk_notebook_get_n_pages(Handle notebook)
gtk_notebook_get_nth_page
protected static final Handle gtk_notebook_get_nth_page(Handle notebook,
int pageNum)
gtk_notebook_get_scrollable
protected static final boolean gtk_notebook_get_scrollable(Handle notebook)
gtk_notebook_get_show_border
protected static final boolean gtk_notebook_get_show_border(Handle notebook)
gtk_notebook_get_show_tabs
protected static final boolean gtk_notebook_get_show_tabs(Handle notebook)
gtk_notebook_get_tab_label
protected static final Handle gtk_notebook_get_tab_label(Handle notebook,
Handle child)
gtk_notebook_get_tab_label_text
protected static final String gtk_notebook_get_tab_label_text(Handle notebook,
Handle child)
gtk_notebook_get_tab_pos
protected static final int gtk_notebook_get_tab_pos(Handle notebook)
gtk_notebook_get_type
protected static final int gtk_notebook_get_type()
gtk_notebook_insert_page
protected static final void gtk_notebook_insert_page(Handle notebook,
Handle child,
Handle tabLabel,
int position)
gtk_notebook_insert_page_menu
protected static final void gtk_notebook_insert_page_menu(Handle notebook,
Handle child,
Handle tabLabel,
Handle menuLabel,
int position)
gtk_notebook_new
protected static final Handle gtk_notebook_new()
gtk_notebook_next_page
protected static final void gtk_notebook_next_page(Handle notebook)
gtk_notebook_page_num
protected static final int gtk_notebook_page_num(Handle notebook,
Handle child)
gtk_notebook_popup_disable
protected static final void gtk_notebook_popup_disable(Handle notebook)
gtk_notebook_popup_enable
protected static final void gtk_notebook_popup_enable(Handle notebook)
gtk_notebook_prepend_page
protected static final void gtk_notebook_prepend_page(Handle notebook,
Handle child,
Handle tabLabel)
gtk_notebook_prepend_page_menu
protected static final void gtk_notebook_prepend_page_menu(Handle notebook,
Handle child,
Handle tabLabel,
Handle menuLabel)
gtk_notebook_prev_page
protected static final void gtk_notebook_prev_page(Handle notebook)
gtk_notebook_query_tab_label_packing
protected static final void gtk_notebook_query_tab_label_packing(Handle notebook,
Handle child,
boolean[] expand,
boolean[] fill,
int[] packType)
gtk_notebook_remove_page
protected static final void gtk_notebook_remove_page(Handle notebook,
int pageNum)
gtk_notebook_reorder_child
protected static final void gtk_notebook_reorder_child(Handle notebook,
Handle child,
int position)
gtk_notebook_set_current_page
protected static final void gtk_notebook_set_current_page(Handle notebook,
int pageNum)
gtk_notebook_set_menu_label
protected static final void gtk_notebook_set_menu_label(Handle notebook,
Handle child,
Handle menuLabel)
gtk_notebook_set_menu_label_text
protected static final void gtk_notebook_set_menu_label_text(Handle notebook,
Handle child,
String menuText)
gtk_notebook_set_scrollable
protected static final void gtk_notebook_set_scrollable(Handle notebook,
boolean scrollable)
gtk_notebook_set_show_border
protected static final void gtk_notebook_set_show_border(Handle notebook,
boolean showBorder)
gtk_notebook_set_show_tabs
protected static final void gtk_notebook_set_show_tabs(Handle notebook,
boolean showTabs)
gtk_notebook_set_tab_label
protected static final void gtk_notebook_set_tab_label(Handle notebook,
Handle child,
Handle tabLabel)
gtk_notebook_set_tab_label_packing
protected static final void gtk_notebook_set_tab_label_packing(Handle notebook,
Handle child,
boolean expand,
boolean fill,
int packType)
gtk_notebook_set_tab_label_text
protected static final void gtk_notebook_set_tab_label_text(Handle notebook,
Handle child,
String tabText)
gtk_notebook_set_tab_pos
protected static final void gtk_notebook_set_tab_pos(Handle notebook,
int pos)
insertPage
public void insertPage(Widget child,
Widget tabLabel,
int position)
Insert a page into the Notebook at the given position.
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.
insertPage
public void insertPage(Widget child,
Widget tabLabel,
Widget menuLabel,
int position)
Insert a page into the Notebook at the given position.
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.
nextPage
public void nextPage()
Switches to the next page. Nothing happens if the current page is the
last page.
pageNum
public int pageNum(Widget child)
Finds the index of the page which contains the given child.
child
- The widget to locate.
- The index of the page which contaons the given child.
popupDisable
public void popupDisable()
disables the popup menu.
popupEnable
public void popupEnable()
Enables the popup menu.
prependPage
public void prependPage(Widget child,
Widget tabLabel)
Prepend a page to the Notebook.
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
prependPage
public void prependPage(Widget child,
Widget tabLabel,
Widget menuLabel)
Prepend a page to the Notebook.
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
.
prevPage
public void prevPage()
Switches to the previous page. Nothing happens if the current page is the
first page.
removeListener
public void removeListener(NotebookListener listener)
Unregister an object that was receiving notebook event notification.
listener
- The object that is to no longer receive
notebook events.
removePage
public void removePage(int pageNumber)
Removes a page fro the Notegook given its index in the notebook.
pageNumber
- The offset (starting with 0) for the page to remove.
reorderChild
public void reorderChild(Widget child,
int position)
Reorders the page containing child
, 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.
child
- The widget to move.position
- The index (starting with 0) to move the child.
setCurrentPage
public void setCurrentPage(int pageNum)
sets the page at offset pageNum
to the current page.
setMenuLabel
public void setMenuLabel(Widget child,
String menuText)
Creates a new label and sets it as the menu label of child
.
setMenuLabel
public void setMenuLabel(Widget child,
Widget menuLabel)
Changes the menu label for the page containing child
.
setScrollable
public 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.
setShowBorder
public void setShowBorder(boolean showBorder)
Sets whether a bevel will be drawn around the notebook pages.
setShowTabs
public void setShowTabs(boolean showTabs)
sets whether to show the tabs for the notebook or not.
setTabLabel
public void setTabLabel(Widget child,
String tabText)
Creates a new label and sets it as the labelf or the page containing child
.
setTabLabel
public void setTabLabel(Widget child,
Widget tabLabel)
Changes the tab label for child
.
setTabLabelPacking
public void setTabLabelPacking(Widget child,
boolean expand,
boolean fill,
PackType packType)
Sets the packing parameters for the tab label of the page containing child
.
Box
setTabPosition
public void setTabPosition(PositionType pos)
Sets the edge at which the tabs for switching pages in the Notebook are drawn.