當前位置: 首頁>>代碼示例>>Java>>正文


Java CloseEvent.fire方法代碼示例

本文整理匯總了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);
		}
	}
}
 
開發者ID:opendata-euskadi,項目名稱:r01fb,代碼行數:12,代碼來源:TreeViewItem.java

示例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);
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:13,代碼來源:Tree.java

示例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);
    }
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:10,代碼來源:LazyStackPanelHeader.java

示例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);
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:13,代碼來源:AutoCloseBox.java

示例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 );
}
 
開發者ID:ltearno,項目名稱:hexa.tools,代碼行數:12,代碼來源:DialogBoxForLayoutWidget.java

示例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 );
}
 
開發者ID:ltearno,項目名稱:hexa.tools,代碼行數:12,代碼來源:DialogBoxForNormalWidget.java

示例7: close

import com.google.gwt.event.logical.shared.CloseEvent; //導入方法依賴的package包/類
public void close() {
    if (isAttached()) {
        removeFromParent();
        CloseEvent.fire(this, this);
    }
}
 
開發者ID:GwtMaterialDesign,項目名稱:gwt-material,代碼行數:7,代碼來源:MaterialChip.java

示例8: onDetach

import com.google.gwt.event.logical.shared.CloseEvent; //導入方法依賴的package包/類
@Override
protected void onDetach() {
    super.onDetach();
    CloseEvent.fire(TabPane.this, TabPane.this, true);
}
 
開發者ID:lsst,項目名稱:firefly,代碼行數:6,代碼來源:TabPane.java

示例9: onCloseClicked

import com.google.gwt.event.logical.shared.CloseEvent; //導入方法依賴的package包/類
@UiHandler("btnClose")
void onCloseClicked (ClickEvent e) {
	setVisible(false);

	CloseEvent.fire(this, this, false);
}
 
開發者ID:billy1380,項目名稱:blogwt,代碼行數:7,代碼來源:AlertBox.java

示例10: dismiss

import com.google.gwt.event.logical.shared.CloseEvent; //導入方法依賴的package包/類
public void dismiss () {
	setVisible(false);

	CloseEvent.fire(this, this, true);
}
 
開發者ID:billy1380,項目名稱:blogwt,代碼行數:6,代碼來源:AlertBox.java

示例11: hide

import com.google.gwt.event.logical.shared.CloseEvent; //導入方法依賴的package包/類
@Override
public void hide() {
    popup.hide();
    CloseEvent.fire(this,
                    this);
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:7,代碼來源:CloneRepositoryViewImpl.java

示例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;
}
 
開發者ID:consulo,項目名稱:consulo,代碼行數:76,代碼來源:CellBrowser.java


注:本文中的com.google.gwt.event.logical.shared.CloseEvent.fire方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。