Examples of SelectionEvent


Examples of com.bbn.openmap.omGraphics.event.SelectionEvent

    public void deleteSelected() {
        Iterator it = deleteList.values().iterator();

        while (it.hasNext()) {
            SelectionEvent item = (SelectionEvent) it.next();
            Object itemSource = item.getSource();

            // Too specific?
            if (itemSource instanceof OMDrawingTool) {
                // This should notify the requestor...
                ((OMDrawingTool) itemSource).deactivate(OMGraphicConstants.DELETE_GRAPHIC_MASK);

            } else {
                if (item != null) { // is this check necessary? I
                    // doubt it.
                    DrawingToolRequestor requestor = item.getRequestor();
                    OMGraphic omg = item.getOMGraphic();
                    if (requestor != null) {
                        requestor.drawingComplete(omg,
                                new OMAction(OMGraphicConstants.DELETE_GRAPHIC_MASK));
                    } else {
                        // if there isn't a requestor specified, tell
View Full Code Here

Examples of com.cedarsoft.spring.rcp.events.SelectionEvent

  private DynamicLookup currentlySelectedObjects = new DynamicLookup();

  @Override
  public void onApplicationEvent( @NotNull ApplicationEvent event ) {
    if ( event instanceof SelectionEvent ) {
      SelectionEvent selectionEvent = ( SelectionEvent ) event;

      if ( selectionEvent.getObjects().lookups().isEmpty() ) {
        return;
      }

      switch ( selectionEvent.getType() ) {
        case SELECT:
          select( selectionEvent.getObjects() );
          break;
        case UNSELECT:
          unselect( selectionEvent.getObjects() );
          break;
        default:
          throw new IllegalArgumentException( "Invalid type " + selectionEvent.getType() );
      }
    }
  }
View Full Code Here

Examples of com.eteks.sweethome3d.model.SelectionEvent

   * Updates the selected furniture in library and notifies listeners selection change.
   */
  public void setSelectedFurniture(List<CatalogPieceOfFurniture> selectedFurniture) {
    this.selectedFurniture = new ArrayList<CatalogPieceOfFurniture>(selectedFurniture);
    if (!this.selectionListeners.isEmpty()) {
      SelectionEvent selectionEvent = new SelectionEvent(this, getSelectedFurniture());
      // Work on a copy of selectionListeners to ensure a listener
      // can modify safely listeners list
      SelectionListener [] listeners = this.selectionListeners.
          toArray(new SelectionListener [this.selectionListeners.size()]);
      for (SelectionListener listener : listeners) {
View Full Code Here

Examples of com.eteks.sweethome3d.model.SelectionEvent

   * Updates the selected furniture in catalog and notifies listeners selection change.
   */
  public void setSelectedFurniture(List<CatalogPieceOfFurniture> selectedFurniture) {
    this.selectedFurniture = new ArrayList<CatalogPieceOfFurniture>(selectedFurniture);
    if (!this.selectionListeners.isEmpty()) {
      SelectionEvent selectionEvent = new SelectionEvent(this, getSelectedFurniture());
      // Work on a copy of selectionListeners to ensure a listener
      // can modify safely listeners list
      SelectionListener [] listeners = this.selectionListeners.
        toArray(new SelectionListener [this.selectionListeners.size()]);
      for (SelectionListener listener : listeners) {
View Full Code Here

Examples of com.extjs.gxt.ui.client.event.SelectionEvent

    if (!keepExisting && selected.size() > 0) {
      change = true;
      doDeselect(new ArrayList<M>(selected), true);
    }
    for (M m : models) {
      SelectionEvent e = new SelectionEvent(this, m);
      e.index = store.indexOf(m);
      if (!fireEvent(Events.BeforeSelect, e)) {
        continue;
      }
      change = true;
View Full Code Here

Examples of com.sun.messaging.jmq.admin.apps.console.event.SelectionEvent

    */

    /*
     * Dispatch a selection event.
     */
          SelectionEvent se = new SelectionEvent(this, SelectionEvent.OBJ_SELECTED);
          se.setSelectedObj((ConsoleObj)o);

          fireAdminEventDispatched(se);
      }
  }
    }
View Full Code Here

Examples of com.sun.messaging.jmq.admin.apps.console.event.SelectionEvent

     */
    public void select(ConsoleObj cObj)  {
  DefaultMutableTreeNode node = (DefaultMutableTreeNode)cObj;
  tree.setSelectionPath(new TreePath(node.getPath()));

  SelectionEvent se = new SelectionEvent(this, SelectionEvent.OBJ_SELECTED);
  se.setSelectedObj((ConsoleObj)node);
  fireAdminEventDispatched(se);
 
    }
View Full Code Here

Examples of com.sun.messaging.jmq.admin.apps.console.event.SelectionEvent

     * BEGIN INTERFACE TreeSelectionListener
     */
    public void valueChanged(TreeSelectionEvent e) {
        DefaultMutableTreeNode node =
      (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
  SelectionEvent se;

  if (node == null)  {
      /*
       * We don't support this yet.
       * Except at startup, an object will always be selected.
      se = new SelectionEvent(this, SelectionEvent.CLEAR_SELECTION);
      */
  } else  {
      /*
      System.err.println("node selected class: " + node.getClass().getName());
      System.err.println("node selected userObject class: " + node.getClass().getName());
      */

      se = new SelectionEvent(this, SelectionEvent.OBJ_SELECTED);
      se.setSelectedObj((ConsoleObj)node);
      fireAdminEventDispatched(se);
  }

    }
View Full Code Here

Examples of edu.stanford.bmir.protege.web.client.ui.selection.SelectionEvent

        final TreeSelectionModel selModel = treePanel.getSelectionModel();
        if (selModel instanceof DefaultSelectionModel) {
            ((DefaultSelectionModel) selModel).addSelectionModelListener(new DefaultSelectionModelListenerAdapter() {
                @Override
                public void onSelectionChange(final DefaultSelectionModel sm, final TreeNode node) {
                    notifySelectionListeners(new SelectionEvent(ClassTreePortlet.this));
                }
            });
        }
        else if (selModel instanceof MultiSelectionModel) {
            ((MultiSelectionModel) selModel).addSelectionModelListener(new MultiSelectionModelListener() {
                public void onSelectionChange(final MultiSelectionModel sm, final TreeNode[] nodes) {
                    notifySelectionListeners(new SelectionEvent(ClassTreePortlet.this));
                }
            });
        }
        else {
            GWT.log("Unknown tree selection model for class tree: " + selModel, null);
View Full Code Here

Examples of org.apache.batik.gvt.event.SelectionEvent

    public void changeCompleted (GraphicsNodeChangeEvent gnce) {
        if (selectionNode == null) return;
        Shape newShape =
            ((Selectable)selectionNode).getHighlightShape();
        dispatchSelectionEvent
            (new SelectionEvent(getSelection(),
                                SelectionEvent.SELECTION_CHANGED,
                                newShape));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.