当前位置: 首页>>代码示例>>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;未经允许,请勿转载。