Package se.conciliate.extensions.ui
Interface Binder
public interface Binder
Keeps track of all pages opened in the user interface.
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds a new listener for changes to the binder.voidcloseAllPages(boolean checkForUnsavedChanges, Runnable callback) Closes all currently opened pages.voidcloseCurrentPage(boolean checkForUnsavedChanges, Runnable callback) Closes the current page.voidcloseOtherPages(boolean checkForUnsavedChanges, Runnable callback) Closes all but the currently selected page.voidCloses a previously opened page.voidFinds all currently opened pages.Page<?>Finds a currently opened page in the UI.Page<?>findPageByContent(Object content) Finds a currently opened page in the UI by its content.findPageByTag(String tag) Finds a currently opened page in the UI by its optional tag.Page<?>Returns the currently selected page.booleanisAttached(Page<?> page) Returns true if the page is attached in the binder, i.e.voidopenAttachedPage(Page<?> page) Opens a page and makes it attached, i.e.voidopenAttachedPage(Page<?> page, int relativePosition) Opens a page at a given index and makes it attached, i.e.voidOpens a page in the user interface.voidopenPageAt(Page<?> page, int relativePosition) Opens a page in the user interface at the relative position given.voidRemoves a listener for changes to the binder.
- 
Method Details- 
addBinderListenerAdds a new listener for changes to the binder.- Parameters:
- l- The listener to add.
- Since:
- 3.2
 
- 
removeBinderListenerRemoves a listener for changes to the binder.- Parameters:
- l- The listener to remove.
- Since:
- 3.2
 
- 
getSelectedPagePage<?> getSelectedPage()Returns the currently selected page.- Returns:
- The currently selected page.
- Since:
- 3.2
 
- 
isAttachedReturns true if the page is attached in the binder, i.e. not closeable by user.
- 
findPageFinds a currently opened page in the UI.- Parameters:
- page- The page to find.
- Returns:
- A page or nullif the page is not currently open.
- Since:
- 3.2
 
- 
findAllPagesFinds all currently opened pages.- Returns:
- A list containing all open pages. This list is sorted based on the current layout. (If Pages are layed out left to right, the leftmost Page will be at index 0 in the list.)
- Since:
- 3.2
 
- 
findPageByContentFinds a currently opened page in the UI by its content.- Parameters:
- content- The content of the page to find.
- Returns:
- The first page with content that equals the supplied content,
 or nullif no such page is found.
- Since:
- 3.2
 
- 
findPageByTagFinds a currently opened page in the UI by its optional tag.- Parameters:
- tag- The tag of the page to find.
- Returns:
- The first page with a tag that equals the supplied tag,
 or nullif no such page is found.
- Since:
- 4.3
 
- 
openPageOpens a page in the user interface. If this page is already open it will become the selected page.- Parameters:
- page- The page to open.
- Since:
- 3.2
 
- 
openAttachedPageOpens a page and makes it attached, i.e. not removable by user.
- 
openAttachedPageOpens a page at a given index and makes it attached, i.e. not removable by user.
- 
openPageAtOpens a page in the user interface at the relative position given. A relative position can be any integer. If two pages are opened with the same relative position, they will appear in a "first-in-first-displayed" (FIFO) manner. What "first displayed" means is up to the implementation but as an example, a binder functioning as a horisontal tabbed pane will likely interpret first as the left-most tab in most locales. Thus, for such a binder, the first page that is opened with the position 7, will be the left-most page out of all pages with the position 7.
 When there occupying the same position, the page will be ordered so that the page with the smallest position is placed "before" pages with higher positions. Again, it is up to the implementation to decide what "before" means but in a horisontal tabbed pane, it is likely that "before" is interpreted as "more to the left".
 If the page is already open, the position argument will be ignored and the page will become the selected page (without changing position).- Parameters:
- page- The page to open.
- relativePosition- The position of the page relative the other pages. Pages that are not opened with a relative position (those opened with- openPage) will have a relative position of- Integer.MAX_VALUE.
- See Also:
 
- 
closePageCloses a previously opened page.- Parameters:
- page- The page to close.
- checkForUnsavedChanges-- trueif a dialog should be shown to the user if there are unsaved changes.
- callback- A callback that will be called on the EDT when the tab has been closed (and saved if so chosen), or- nullif no callback is needed.
- Since:
- 3.2
 
- 
closePage
- 
closeCurrentPageCloses the current page.- Parameters:
- checkForUnsavedChanges-- trueif a dialog should be shown to the user if there are unsaved changes.
- callback- A callback that will be called on the EDT when the tab has been closed (and saved if so chosen), or- nullif no callback is needed.
- Since:
- 3.2
 
- 
closeAllPagesCloses all currently opened pages.- Parameters:
- checkForUnsavedChanges-- trueif a dialog should be shown to the user if there are unsaved changes.
- callback- A callback that will be called on the EDT when all pages have been closed (and saved if so chosen), or- nullif no callback is needed.
- Since:
- 3.2
 
- 
closeOtherPagesCloses all but the currently selected page.- Parameters:
- checkForUnsavedChanges-- trueif a dialog should be shown to the user if there are unsaved changes.
- callback- A callback that will be called on the EDT when all pages have been closed (and saved if so chosen), or- nullif no callback is needed.
- Since:
- 3.2
 
 
-