TransitionContainer
.@Deprecated public class Navigator extends Wrapper
EMPTY_ELEMENT_ARRAY
Constructor and Description |
---|
Navigator()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected void |
add(Widget widget)
Deprecated.
Adds the specified widget to the end of the list of children of this composite.
|
protected boolean |
canGoBackward()
Deprecated.
Gets whether or not it is possible to go backward.
|
protected boolean |
canGoForward()
Deprecated.
Gets whether or not it is possible to go forward.
|
protected Rectangle |
getContentBounds()
Deprecated.
Gets the contents bounds for a child page.
|
Page |
getCurrentPage()
Deprecated.
Gets the current page.
|
protected Page |
getNextPage()
Deprecated.
Gets the next page.
|
protected Page |
getPreviousPage()
Deprecated.
Gets the previous page.
|
TransitionManager |
getTransitionManager()
Deprecated.
Gets the transition manager.
|
protected void |
goBackward()
Deprecated.
Shows the previous page.
|
protected void |
goForward()
Deprecated.
Shows the next page.
|
boolean |
handleEvent(int event)
Deprecated.
Called by the system if a child of this composite is the owner of the focus of the active panel (recursively) and
have not consumed the specified event.
|
protected void |
remove(Widget widget)
Deprecated.
Removes the specified widget from the list of children of this composite.
|
void |
renderContent(GraphicsContext g,
Style style,
Rectangle bounds)
Deprecated.
Renders the content of the renderable without the border, margin and padding specified in the style.
|
protected void |
setBoundsContent(Rectangle bounds)
Deprecated.
Sets the bounds of this widget by taking into account the border, margin and padding specified in the style.
|
protected void |
setChildBounds(Page newPage)
Deprecated.
Sets the bounds of a new page.
|
protected void |
setCurrentPage(Page page)
Deprecated.
Sets the current page.
|
void |
setTransitionManager(TransitionManager transitionManager)
Deprecated.
Sets the transition manager.
|
protected void |
show(Page newPage,
boolean forward)
Deprecated.
Shows a new page.
|
protected void |
updateCurrentPage(Page newPage)
Deprecated.
Replaces the current page by the new one.
|
Rectangle |
validateContent(Style style,
Rectangle bounds)
Deprecated.
Gets the content size of the renderable without the border, margin and padding specified in the style.
|
contains, isAdjustedToChild, setAdjustedToChild, setWidget
addClassSelector, gainFocus, getAttribute, getChild, getChildrenCount, getChildrenElements, getParentElement, getStyle, hasClassSelector, isInState, isTransparent, lostFocus, mergeStyle, removeAllClassSelectors, removeClassSelector, removeInstanceStyle, render, setBounds, setClassSelectors, setEnabled, updateStyle, updateStyleOnly, validate
getFocus, getFocusIndex, getNext, getWidget, getWidgetAt, getWidgets, getWidgetsCount, hideNotify, iterator, removeAllWidgets, requestFocus, requestFocus, requestFocusFrom, showNotify
getAbsoluteX, getAbsoluteX, getAbsoluteY, getAbsoluteY, getEventHandler, getHeight, getPanel, getParent, getPreferredHeight, getPreferredWidth, getRelativeX, getRelativeY, getWidth, getX, getY, hasFocus, invalidate, isEnabled, isShown, isValid, isVisible, repaint, repaint, revalidate, revalidateSubTree, setEventHandler, setLocation, setPreferredSize, setSize, setVisible
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEventHandler, getHeight, getWidth, getX, getY, hideNotify, isShown, repaint, repaint, setEventHandler, showNotify
public Page getCurrentPage()
protected void setCurrentPage(Page page)
page
- the page to set as current one.public void setTransitionManager(TransitionManager transitionManager)
If the given transition manager is null
, there is no more transition manager associated with the
navigator.
transitionManager
- the transition manager to set.java.lang.IllegalArgumentException
- if the given transition manager is already associated with a navigation.public TransitionManager getTransitionManager()
protected void show(Page newPage, boolean forward)
If a transition manager has been set, it will be used to animate the transition.
newPage
- the new page to show.forward
- true
if going to a new page, false
if going back in the stack of pages.protected boolean canGoBackward()
true
if it is possible to go backward, false
otherwise.protected Page getPreviousPage()
null
if cannot go backward.protected void goBackward()
Nothing is done if cannot go backward.
protected boolean canGoForward()
true
if it is possible to go forward, false
otherwise.protected Page getNextPage()
null
if cannot go forward.protected void goForward()
Nothing is done if cannot go forward.
public void renderContent(GraphicsContext g, Style style, Rectangle bounds)
StyledRenderable
The given graphics context is translated and clipped according to the given bounds (the border, margin and padding are applied on this graphics context before).
renderContent
in interface StyledRenderable
renderContent
in class StyledComposite
g
- the graphics context where to render the content of the renderable.style
- the style to use.bounds
- the remaining size to render the content.Outline.apply(GraphicsContext, Rectangle)
,
Border.apply(GraphicsContext, Rectangle, int)
,
StyleHelper.renderWithoutContent(GraphicsContext, Rectangle, Style)
public boolean handleEvent(int event)
Composite
Command#UP
, Command#DOWN
,
Command#LEFT
, and Command#RIGHT
commands to manage navigation in its children.handleEvent
in interface Renderable
handleEvent
in class Composite
event
- the event to handletrue
if the composite consume the event, false
otherwiseWidget.setEventHandler(EventHandler)
protected void updateCurrentPage(Page newPage)
newPage
- the new page.public Rectangle validateContent(Style style, Rectangle bounds)
StyledComposite
Lays out the children of this composite.
validateContent
in interface StyledRenderable
validateContent
in class Wrapper
style
- the style to use.bounds
- the bounds available for the content. A width or a height equals to MWT.NONE
means no
constraint on this dimension.protected void setBoundsContent(Rectangle bounds)
StyledComposite
setBoundsContent
in class Wrapper
bounds
- the bounds available for the content.protected void setChildBounds(Page newPage)
newPage
- the new page.getContentBounds()
protected Rectangle getContentBounds()
StyleHelper.computeContentBounds(Rectangle, Style)
protected void add(Widget widget)
StyledComposite
If the composite is on a panel hierarchy, it is invalidated.
If the given widget is not an Element
, an IllegalArgumentException
is thrown.
add
in class StyledComposite
widget
- the widget to add.Element
,
StyledWidget
,
StyledComposite
protected void remove(Widget widget)
Composite
If the composite is on a panel hierarchy, it is invalidated.
If the widget is not in the list of children of the composite, nothing is done.
remove
in class Composite
widget
- the widget to removeWidget.invalidate()