本文整理匯總了Java中com.google.gwt.event.logical.shared.CloseEvent.fire方法的典型用法代碼示例。如果您正苦於以下問題:Java CloseEvent.fire方法的具體用法?Java CloseEvent.fire怎麽用?Java CloseEvent.fire使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.event.logical.shared.CloseEvent
的用法示例。
在下文中一共展示了CloseEvent.fire方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: _fireExpandOrCollapseEvent
import com.google.gwt.event.logical.shared.CloseEvent; //導入方法依賴的package包/類
void _fireExpandOrCollapseEvent(final boolean expand) {
if (_tree != null) {
if (expand) {
OpenEvent.fire(_tree,this);
TreeViewItemExpandEvent.fire(_tree,this);
} else {
CloseEvent.fire(_tree,this);
TreeViewItemCollapseEvent.fire(_tree,this);
}
}
}
示例2: fireStateChanged
import com.google.gwt.event.logical.shared.CloseEvent; //導入方法依賴的package包/類
void fireStateChanged(final T item,
final T.State state) {
if (state.equals(T.State.OPEN)) {
OpenEvent.fire(this,
item);
} else {
CloseEvent.fire(this,
item);
}
onSelection(item,
true);
}
示例3: onTitleClicked
import com.google.gwt.event.logical.shared.CloseEvent; //導入方法依賴的package包/類
private void onTitleClicked() {
if (expanded) {
CloseEvent.fire(this,
this);
} else {
OpenEvent.fire(this,
this);
}
}
示例4: close
import com.google.gwt.event.logical.shared.CloseEvent; //導入方法依賴的package包/類
public void close() {
if (nativePreviewHandlerRegistration != null) {
nativePreviewHandlerRegistration.removeHandler();
nativePreviewHandlerRegistration = null;
}
if (historyHandlerRegistration != null) {
historyHandlerRegistration.removeHandler();
historyHandlerRegistration = null;
}
removeFromParent();
CloseEvent.fire(this, this);
}
示例5: hide
import com.google.gwt.event.logical.shared.CloseEvent; //導入方法依賴的package包/類
@Override
public void hide()
{
if( ! isDisplayed )
return;
isDisplayed = false;
RootLayoutPanel.get().remove( dock );
CloseEvent.fire( this, null );
}
示例6: hide
import com.google.gwt.event.logical.shared.CloseEvent; //導入方法依賴的package包/類
@Override
public void hide()
{
if( ! isDisplayed )
return;
isDisplayed = false;
RootPanel.get().remove( this );
CloseEvent.fire( this, null );
}
示例7: close
import com.google.gwt.event.logical.shared.CloseEvent; //導入方法依賴的package包/類
public void close() {
if (isAttached()) {
removeFromParent();
CloseEvent.fire(this, this);
}
}
示例8: onDetach
import com.google.gwt.event.logical.shared.CloseEvent; //導入方法依賴的package包/類
@Override
protected void onDetach() {
super.onDetach();
CloseEvent.fire(TabPane.this, TabPane.this, true);
}
示例9: onCloseClicked
import com.google.gwt.event.logical.shared.CloseEvent; //導入方法依賴的package包/類
@UiHandler("btnClose")
void onCloseClicked (ClickEvent e) {
setVisible(false);
CloseEvent.fire(this, this, false);
}
示例10: dismiss
import com.google.gwt.event.logical.shared.CloseEvent; //導入方法依賴的package包/類
public void dismiss () {
setVisible(false);
CloseEvent.fire(this, this, true);
}
示例11: hide
import com.google.gwt.event.logical.shared.CloseEvent; //導入方法依賴的package包/類
@Override
public void hide() {
popup.hide();
CloseEvent.fire(this,
this);
}
示例12: updateChildState
import com.google.gwt.event.logical.shared.CloseEvent; //導入方法依賴的package包/類
/**
* Update the state of a child node based on the keyboard selection of the
* specified {@link BrowserCellList}. This method will open/close child
* {@link TreeNode}s as needed.
*
* @param cellList the CellList that changed state.
* @param fireEvents true to fireEvents
* @return the open {@link TreeNode}, or null if not opened
*/
private <C> TreeNode updateChildState(BrowserCellList<C> cellList, boolean fireEvents) {
/*
* Verify that the specified list is still in the browser. It possible for
* the list to receive deferred updates after it has been removed
*/
if (cellList.isDestroyed) {
return null;
}
// Get the key of the value to open.
C newValue = cellList.getPresenter().getKeyboardSelectedRowValue();
Object newKey = cellList.getValueKey(newValue);
// Close the current open node.
TreeNode closedNode = null;
if (cellList.focusedKey != null && cellList.isFocusedOpen
&& !cellList.focusedKey.equals(newKey)) {
// Get the node to close.
closedNode =
(treeNodes.size() > cellList.level + 1) ? treeNodes.get(cellList.level + 1) : null;
// Close the node.
trimToLevel(cellList.level);
}
// Open the new node.
TreeNode openNode = null;
boolean justOpenedNode = false;
if (newKey != null) {
if (newKey.equals(cellList.focusedKey)) {
// The node is already open.
openNode = cellList.isFocusedOpen ? treeNodes.get(cellList.level + 1) : null;
} else {
// Select this value.
if (KeyboardSelectionPolicy.BOUND_TO_SELECTION == getKeyboardSelectionPolicy()) {
cellList.setSelectedValue(newValue);
}
// Add the child node if this node has children.
cellList.focusedKey = newKey;
NodeInfo<?> childNodeInfo = isLeaf(newValue) ? null : getNodeInfo(newValue);
if (childNodeInfo != null) {
cellList.isFocusedOpen = true;
justOpenedNode = true;
openNode = appendTreeNode(childNodeInfo, newValue);
}
}
}
/*
* Fire event. We fire events after updating the view in case user event
* handlers modify the open state of nodes, which would interrupt the
* process.
*/
if (fireEvents) {
if (closedNode != null) {
CloseEvent.fire(this, closedNode);
}
if (openNode != null && justOpenedNode) {
OpenEvent.fire(this, openNode);
}
}
// Return the open node if it is still open.
return (openNode == null || openNode.isDestroyed()) ? null : openNode;
}