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


Java SelectionEvent.fire方法代碼示例

本文整理匯總了Java中com.google.gwt.event.logical.shared.SelectionEvent.fire方法的典型用法代碼示例。如果您正苦於以下問題:Java SelectionEvent.fire方法的具體用法?Java SelectionEvent.fire怎麽用?Java SelectionEvent.fire使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.gwt.event.logical.shared.SelectionEvent的用法示例。


在下文中一共展示了SelectionEvent.fire方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: selectTab

import com.google.gwt.event.logical.shared.SelectionEvent; //導入方法依賴的package包/類
public void selectTab(int index, boolean fireEvents) {

        if (index < 0 || index >= _tabs.size()) {
            throw new AssertionError("Index out of bound.");
        }
        if (index == _selectedIndex) {
            return;
        }
        if (fireEvents) {
            BeforeSelectionEvent<Integer> event = BeforeSelectionEvent.fire(this, index);
            if ((event != null) && event.isCanceled()) {
                return;
            }
        }
        _tabBar.selectTab(index);
        _contentPanel.setContent(_tabs.get(index).content());
        _selectedIndex = index;
        if (fireEvents) {
            SelectionEvent.fire(this, index);
        }
    }
 
開發者ID:uom-daris,項目名稱:daris,代碼行數:22,代碼來源:CTabPanel.java

示例2: show

import com.google.gwt.event.logical.shared.SelectionEvent; //導入方法依賴的package包/類
@Override
public void show() {
	dialogBox.show();
	SelectionEvent.fire(tabPanel, currentTabIndex);
	/*
	dialogBox.setPopupPositionAndShow(new PopupPanel.PositionCallback() {
		@Override
		public void setPosition(int offsetWidth, int offsetHeight) {
			dialogBox.setPopupPosition(
					Window.getClientWidth() - offsetWidth, 0);
		}
	});
	*/
}
 
開發者ID:Novartis,項目名稱:ontobrowser,代碼行數:15,代碼來源:ApproveRejectPopup.java

示例3: doSingleSelect

import com.google.gwt.event.logical.shared.SelectionEvent; //導入方法依賴的package包/類
protected void doSingleSelect(Node node, boolean suppressEvent) {
  int index;
  index = nodeStorage.indexOf(node);
  if (index == -1 || isSelected(node)) {
    return;
  } else {
    if (!suppressEvent) {
      BeforeSelectionEvent<Node> evt = BeforeSelectionEvent.fire(this, node);
      if (evt != null && evt.isCanceled()) {
        return;
      }
    }
  }

  boolean change = false;
  if (selectionStorage.size() > 0 && !isSelected(node)) {
    doDeselect(Collections.singletonList(lastSelectedNode), true);
    change = true;
  }

  if (selectionStorage.size() == 0) {
    change = true;
  }

  selectionStorage.add(node);
  lastSelectedNode = node;
  onSelectChange(node, true);
  setLastFocused(lastSelectedNode);

  if (!suppressEvent) {
    SelectionEvent.fire(this, node);
  }

  if (change && !suppressEvent) {
    fireSelectionChange();
  }
}
 
開發者ID:eclipse,項目名稱:che,代碼行數:38,代碼來源:SelectionModel.java

示例4: doMultiSelect

import com.google.gwt.event.logical.shared.SelectionEvent; //導入方法依賴的package包/類
protected void doMultiSelect(List<Node> nodes, boolean keepExisting, boolean suppressEvent) {
  boolean change = false;
  if (!keepExisting && selectionStorage.size() > 0) {
    change = true;
    doDeselect(new ArrayList<>(selectionStorage), true);
  }

  for (Node node : nodes) {

    if (tree.getNodeDescriptor(node) == null) {
      continue;
    }

    boolean isSelected = isSelected(node);
    if (!suppressEvent && !isSelected) {
      BeforeSelectionEvent<Node> evt = BeforeSelectionEvent.fire(this, node);
      if (evt != null && evt.isCanceled()) {
        continue;
      }
    }

    change = true;
    lastSelectedNode = node;

    selectionStorage.add(node);
    setLastFocused(lastSelectedNode);

    if (!isSelected) {
      onSelectChange(node, true);
      if (!suppressEvent) {
        SelectionEvent.fire(this, node);
      }
    }
  }

  if (change && !suppressEvent) {
    fireSelectionChange();
  }
}
 
開發者ID:eclipse,項目名稱:che,代碼行數:40,代碼來源:SelectionModel.java

示例5: _fireSelectionEvent

import com.google.gwt.event.logical.shared.SelectionEvent; //導入方法依賴的package包/類
void _fireSelectionEvent(final Boolean oldSelectedValue,final Boolean selectedValue) {
	// Fire selection event; this fires on selection and un-selection
	SelectionEvent.fire(_tree,
						this);
	// Fire ValueChangeAt event: this fires when selection changes
	ValueChangeAtEvent.fireIfNotEqual(_tree,
									  this,
									  oldSelectedValue,selectedValue);
}
 
開發者ID:opendata-euskadi,項目名稱:r01fb,代碼行數:10,代碼來源:TreeViewItem.java

示例6: onSelection

import com.google.gwt.event.logical.shared.SelectionEvent; //導入方法依賴的package包/類
void onSelection(final T item,
                 final boolean fireEvents) {
    if (curSelection != null) {
        curSelection.setSelected(false);
    }
    curSelection = item;
    if (curSelection != null) {
        // Select the item and fire the selection event.
        curSelection.setSelected(true);
        if (fireEvents) {
            SelectionEvent.fire(this,
                                curSelection);
        }
    }
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:16,代碼來源:Tree.java

示例7: onClick

import com.google.gwt.event.logical.shared.SelectionEvent; //導入方法依賴的package包/類
@Override
public void onClick(final ClickEvent event) {
    if (!hasFocus) {
        fireFocusGained();
        View view = getSelectedPart();
        if (view != null) {
            SelectionEvent.fire(UberTabPanel.this,
                                view.getPresenter().getDefinition());
        }
    }
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:12,代碼來源:UberTabPanel.java

示例8: selectPart

import com.google.gwt.event.logical.shared.SelectionEvent; //導入方法依賴的package包/類
@Override
public boolean selectPart(final PartDefinition part) {
    if (!parts.contains(part)) {
        //not necessary to check if current is part
        return false;
    }

    if (currentPart != null) {
        if (currentPart.getK1().equals(part)) {
            return true;
        }
        parts.add(currentPart.getK1());
        panelManager.onPartHidden(currentPart.getK1());
        currentPart.getK2().getElement().getStyle().setDisplay(NONE);
    }

    currentPart = Pair.newPair(part,
                               partContentView.get(part));
    currentPart.getK2().getElement().getStyle().setDisplay(BLOCK);
    parts.remove(currentPart.getK1());

    if (part.isSelectable()) {
        titleDropDown.selectPart(part);
        setupContextMenu();
        header.setVisible(true);
    } else {
        header.setVisible(false);
    }

    scheduleResize();
    resizePanelBody();

    SelectionEvent.fire(ListBarWidgetImpl.this,
                        part);

    return true;
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:38,代碼來源:ListBarWidgetImpl.java

示例9: showWidget

import com.google.gwt.event.logical.shared.SelectionEvent; //導入方法依賴的package包/類
@Override
public void showWidget(Widget newWidget) {
	Widget oldWidget = visibleWidget;
	super.showWidget(newWidget);
	if (oldWidget != newWidget) {
		SelectionEvent.fire(this, newWidget);
	}
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:9,代碼來源:CardPane.java

示例10: onBrowserEvent

import com.google.gwt.event.logical.shared.SelectionEvent; //導入方法依賴的package包/類
/**
 * @see com.google.gwt.user.client.ui.Widget#onBrowserEvent(com.google.gwt.user.client.Event)
 */
@Override
public void onBrowserEvent(Event event) {
    super.onBrowserEvent(event);
    EventTarget target = event.getEventTarget();
    Element elem = (Element) target.cast();
    String nodeId = elem.getAttribute("data-nodeid"); //$NON-NLS-1$

    if (nodeMap.containsKey(nodeId)) {
        TraceNodeBean bean = nodeMap.get(nodeId);
        SelectionEvent.fire(this, bean);
    }
}
 
開發者ID:Governance,項目名稱:rtgov-ui,代碼行數:16,代碼來源:CallTraceWidget.java

示例11: updateSelectedCell

import com.google.gwt.event.logical.shared.SelectionEvent; //導入方法依賴的package包/類
private void updateSelectedCell( Cell cell, boolean toggle )
{
	if( toggle )
	{
		if( selectedCells.contains( cell ) )
		{
			cell.removeClassName( "selected" );
			cell.getParentRow().removeClassName( "selected" );
			selectedCells.remove( cell );
			return;
		}
	}
	else
	{
		if( selectedCells.size()==1 && cell==selectedCells.get( 0 ) )
			return;
		
		// clear current selection
		for( Cell c : selectedCells )
		{
			c.removeClassName( "selected" );
			c.getParentRow().removeClassName( "selected" );
		}
		selectedCells.clear();
	}
	
	if( cell != null )
	{
		selectedCells.add( cell );
		
		cell.addClassName( "selected" );
		cell.getParentRow().addClassName( "selected" );
		cell.scrollIntoView();
	}
	
	SelectionEvent.fire( this, cell );
}
 
開發者ID:ltearno,項目名稱:hexa.tools,代碼行數:38,代碼來源:DataTableCellSelection.java

示例12: selectTab

import com.google.gwt.event.logical.shared.SelectionEvent; //導入方法依賴的package包/類
/**
 * Programmatically selects the specified tab.
 *
 * @param index the index of the tab to be selected
 * @param fireEvents true to fire events, false not to
 */
public void selectTab(int index, boolean fireEvents) {
  checkIndex(index);
  if (index == selectedIndex) {
    return;
  }

  // Fire the before selection event, giving the recipients a chance to
  // cancel the selection.
  if (fireEvents) {
    BeforeSelectionEvent<Integer> event = BeforeSelectionEvent.fire(this,
        index);
    if ((event != null) && event.isCanceled()) {
      return;
    }
  }

  // Update the tabs being selected and unselected.
  if (selectedIndex != -1) {
    tabs.get(selectedIndex).setSelected(false);
  }

  deckPanel.showWidget(index);
  tabs.get(index).setSelected(true);
  selectedIndex = index;

  // Fire the selection event.
  if (fireEvents) {
    SelectionEvent.fire(this, index);
  }
}
 
開發者ID:fhcampuswien,項目名稱:atom,代碼行數:37,代碼來源:TabLayoutPanelCopy.java

示例13: fireSuggestionEvent

import com.google.gwt.event.logical.shared.SelectionEvent; //導入方法依賴的package包/類
private void fireSuggestionEvent(Suggestion selectedSuggestion) {
	SelectionEvent.fire(this, selectedSuggestion);
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:4,代碼來源:AriaSuggestBox.java

示例14: fireSuggestionEvent

import com.google.gwt.event.logical.shared.SelectionEvent; //導入方法依賴的package包/類
private void fireSuggestionEvent(Integer selectedTimeSlot) {
	SelectionEvent.fire(this, selectedTimeSlot);
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:4,代碼來源:TimeSelector.java

示例15: fireSelectionEvent

import com.google.gwt.event.logical.shared.SelectionEvent; //導入方法依賴的package包/類
private void fireSelectionEvent(Suggestion suggestion) {
	SelectionEvent.fire(this, suggestion);
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:4,代碼來源:FilterBox.java


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