Java Code Examples for java.util.EventObject

The following code examples are extracted from open source projects. You can click to vote up the examples that are useful to you.

Example 1

From project codjo-data-process, under directory /codjo-data-process-common/src/main/java/net/codjo/dataprocess/common/eventsbinder/dynalistener/.

Source file: DynamicListener.java

  18 
vote

public Object invoke(Object proxy,Method method,Object[] args) throws Throwable {
  EventObject eventObject=(EventObject)args[0];
  if (eventChecker.checkEvent(eventObject,method.getName())) {
    eventReaction.reactToAnEvent(eventObject,method.getName());
  }
  return null;
}
 

Example 2

From project drugis-common, under directory /common-test/src/main/java/org/drugis/common/.

Source file: EventObjectMatcher.java

  18 
vote

public boolean matches(Object a){
  if (!a.getClass().equals(d_expected.getClass())) {
    return false;
  }
  EventObject actual=(EventObject)a;
  return eq(actual.getSource(),d_expected.getSource());
}
 

Example 3

From project jchempaint, under directory /src/main/org/openscience/jchempaint/dialog/.

Source file: PeriodicTablePanel.java

  18 
vote

/** 
 * Notifies registered listeners of certain changes that have occurred in this model.
 */
public void fireChange(){
  EventObject event=new EventObject(this);
  for (int i=0; i < listeners.size(); i++) {
    ((ICDKChangeListener)listeners.get(i)).stateChanged(event);
  }
}
 

Example 4

From project jbosgi-framework, under directory /itest/src/test/java/org/jboss/test/osgi/framework/jbosgi450/.

Source file: OSGi450TestCase.java

  17 
vote

private EventObject waitForEvent(int type) throws InterruptedException {
  int timeout=30;
  EventObject eventFound=null;
  while (eventFound == null && 0 < timeout) {
synchronized (bundleEvents) {
      bundleEvents.wait(100);
      for (      BundleEvent event : bundleEvents) {
        if (type == event.getType()) {
          eventFound=event;
          break;
        }
      }
    }
    timeout--;
  }
  return eventFound;
}
 

Example 5

From project jgraphx, under directory /src/com/mxgraph/swing/view/.

Source file: mxCellEditor.java

  17 
vote

public void stopEditing(boolean cancel){
  if (editingCell != null) {
    scrollPane.transferFocusUpCycle();
    Object cell=editingCell;
    editingCell=null;
    if (!cancel) {
      EventObject trig=trigger;
      trigger=null;
      graphComponent.labelChanged(cell,getCurrentValue(),trig);
    }
 else {
      mxCellState state=graphComponent.getGraph().getView().getState(cell);
      graphComponent.redraw(state);
    }
    if (scrollPane.getParent() != null) {
      scrollPane.setVisible(false);
      scrollPane.getParent().remove(scrollPane);
    }
    graphComponent.requestFocusInWindow();
  }
}
 

Example 6

From project skmclauncher, under directory /src/main/java/com/sk89q/mclauncher/.

Source file: Task.java

  17 
vote

/** 
 * Fire that the task has been completed.
 */
private void fireComplete(){
  Object[] listeners=listenerList.getListenerList();
  for (int i=listeners.length - 2; i >= 0; i-=2) {
    ((ProgressListener)listeners[i + 1]).completed(new EventObject(this));
  }
}
 

Example 7

From project acceleo-modules, under directory /psm-gen-scala/plugins/com.github.sbegaudeau.acceleo.modules.psm.gen.scala.editor/src-gen/com/github/sbegaudeau/acceleo/modules/psm/gen/scala/model/scala/presentation/.

Source file: ScalaEditor.java

  15 
vote

/** 
 * This sets up the editing domain for the model editor. <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
protected void initializeEditingDomain(){
  adapterFactory=new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
  adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
  adapterFactory.addAdapterFactory(new ScalaItemProviderAdapterFactory());
  adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
  BasicCommandStack commandStack=new BasicCommandStack();
  commandStack.addCommandStackListener(new CommandStackListener(){
    public void commandStackChanged(    final EventObject event){
      getContainer().getDisplay().asyncExec(new Runnable(){
        public void run(){
          firePropertyChange(IEditorPart.PROP_DIRTY);
          Command mostRecentCommand=((CommandStack)event.getSource()).getMostRecentCommand();
          if (mostRecentCommand != null) {
            setSelectionToViewer(mostRecentCommand.getAffectedObjects());
          }
          if (propertySheetPage != null && !propertySheetPage.getControl().isDisposed()) {
            propertySheetPage.refresh();
          }
        }
      }
);
    }
  }
);
  editingDomain=new AdapterFactoryEditingDomain(adapterFactory,commandStack,new HashMap<Resource,Boolean>());
}
 

Example 8

From project acceleo-webapp-generator, under directory /plugins/org.eclipse.acceleo.tutorial.webapp.editor/src-gen/org/eclipse/acceleo/tutorial/webapp/presentation/.

Source file: WebappEditor.java

  15 
vote

/** 
 * This sets up the editing domain for the model editor. <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
protected void initializeEditingDomain(){
  adapterFactory=new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
  adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
  adapterFactory.addAdapterFactory(new WebappItemProviderAdapterFactory());
  adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
  BasicCommandStack commandStack=new BasicCommandStack();
  commandStack.addCommandStackListener(new CommandStackListener(){
    public void commandStackChanged(    final EventObject event){
      getContainer().getDisplay().asyncExec(new Runnable(){
        public void run(){
          firePropertyChange(IEditorPart.PROP_DIRTY);
          Command mostRecentCommand=((CommandStack)event.getSource()).getMostRecentCommand();
          if (mostRecentCommand != null) {
            setSelectionToViewer(mostRecentCommand.getAffectedObjects());
          }
          if (propertySheetPage != null && !propertySheetPage.getControl().isDisposed()) {
            propertySheetPage.refresh();
          }
        }
      }
);
    }
  }
);
  editingDomain=new AdapterFactoryEditingDomain(adapterFactory,commandStack,new HashMap<Resource,Boolean>());
}
 

Example 9

From project codjo-control, under directory /codjo-control-gui/src/main/java/net/codjo/control/gui/plugin/.

Source file: DefaultQuarantineWindow.java

  15 
vote

@Override protected void reload(EventObject evt){
  if (preventReloadFilterPanel) {
    return;
  }
  super.reload(evt);
}
 

Example 10

From project core_1, under directory /admin/src/main/java/org/switchyard/admin/base/.

Source file: SwitchYardBuilder.java

  15 
vote

@Override public void notify(EventObject event){
  if (event instanceof ApplicationDeployedEvent) {
    applicationDeployed((ApplicationDeployedEvent)event);
  }
 else   if (event instanceof ApplicationUndeployedEvent) {
    applicationUndeployed((ApplicationUndeployedEvent)event);
  }
 else   if (event instanceof ExchangeCompletionEvent) {
    exchangeCompleted((ExchangeCompletionEvent)event);
  }
}
 

Example 11

From project Database-Designer, under directory /plugins/org.obeonetwork.dsl.database.editor/src/org/obeonetwork/dsl/database/presentation/.

Source file: DatabaseEditor.java

  15 
vote

/** 
 * This sets up the editing domain for the model editor. <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
protected void initializeEditingDomain(){
  adapterFactory=new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
  adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
  adapterFactory.addAdapterFactory(new DatabaseItemProviderAdapterFactory());
  adapterFactory.addAdapterFactory(new TypesLibraryItemProviderAdapterFactory());
  adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
  BasicCommandStack commandStack=new BasicCommandStack();
  commandStack.addCommandStackListener(new CommandStackListener(){
    public void commandStackChanged(    final EventObject event){
      getContainer().getDisplay().asyncExec(new Runnable(){
        public void run(){
          firePropertyChange(IEditorPart.PROP_DIRTY);
          Command mostRecentCommand=((CommandStack)event.getSource()).getMostRecentCommand();
          if (mostRecentCommand != null) {
            setSelectionToViewer(mostRecentCommand.getAffectedObjects());
          }
          if (propertySheetPage != null && !propertySheetPage.getControl().isDisposed()) {
            propertySheetPage.refresh();
          }
        }
      }
);
    }
  }
);
  editingDomain=new AdapterFactoryEditingDomain(adapterFactory,commandStack,new HashMap<Resource,Boolean>());
}
 

Example 12

From project des, under directory /daemon/lib/apache-log4j-1.2.16/src/main/java/org/apache/log4j/lf5/viewer/categoryexplorer/.

Source file: CategoryAbstractCellEditor.java

  15 
vote

public boolean isCellEditable(EventObject anEvent){
  if (anEvent instanceof MouseEvent) {
    if (((MouseEvent)anEvent).getClickCount() < _clickCountToStart) {
      return false;
    }
  }
  return true;
}
 

Example 13

From project droolsjbpm-tools, under directory /drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/flow/common/editor/.

Source file: GenericModelEditor.java

  15 
vote

public void commandStackChanged(EventObject event){
  if (isDirty()) {
    if (!savePreviouslyNeeded()) {
      setSavePreviouslyNeeded(true);
      firePropertyChange(IEditorPart.PROP_DIRTY);
    }
  }
 else {
    setSavePreviouslyNeeded(false);
    firePropertyChange(IEditorPart.PROP_DIRTY);
  }
  super.commandStackChanged(event);
}
 

Example 14

From project EMF-IncQuery, under directory /tests/org.eclipse.viatra2.emf.incquery.snapshot.editor/src/org/eclipse/viatra2/emf/incquery/snapshot/EIQSnapshot/presentation/.

Source file: EIQSnapshotEditor.java

  15 
vote

/** 
 * This sets up the editing domain for the model editor. <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
protected void initializeEditingDomain(){
  adapterFactory=new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
  adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
  adapterFactory.addAdapterFactory(new EIQSnapshotItemProviderAdapterFactory());
  adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
  adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
  BasicCommandStack commandStack=new BasicCommandStack();
  commandStack.addCommandStackListener(new CommandStackListener(){
    public void commandStackChanged(    final EventObject event){
      getContainer().getDisplay().asyncExec(new Runnable(){
        public void run(){
          firePropertyChange(IEditorPart.PROP_DIRTY);
          Command mostRecentCommand=((CommandStack)event.getSource()).getMostRecentCommand();
          if (mostRecentCommand != null) {
            setSelectionToViewer(mostRecentCommand.getAffectedObjects());
          }
          if (propertySheetPage != null && !propertySheetPage.getControl().isDisposed()) {
            propertySheetPage.refresh();
          }
        }
      }
);
    }
  }
);
  editingDomain=new AdapterFactoryEditingDomain(adapterFactory,commandStack,new HashMap<Resource,Boolean>());
}
 

Example 15

From project fr.obeo.performance, under directory /fr.obeo.performance.editor/src-gen/fr/obeo/performance/presentation/.

Source file: PerformanceEditor.java

  15 
vote

/** 
 * This sets up the editing domain for the model editor. <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
protected void initializeEditingDomain(){
  adapterFactory=new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
  adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
  adapterFactory.addAdapterFactory(new PerformanceItemProviderAdapterFactory());
  adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
  BasicCommandStack commandStack=new BasicCommandStack();
  commandStack.addCommandStackListener(new CommandStackListener(){
    public void commandStackChanged(    final EventObject event){
      getContainer().getDisplay().asyncExec(new Runnable(){
        public void run(){
          firePropertyChange(IEditorPart.PROP_DIRTY);
          Command mostRecentCommand=((CommandStack)event.getSource()).getMostRecentCommand();
          if (mostRecentCommand != null) {
            setSelectionToViewer(mostRecentCommand.getAffectedObjects());
          }
          if (propertySheetPage != null && !propertySheetPage.getControl().isDisposed()) {
            propertySheetPage.refresh();
          }
        }
      }
);
    }
  }
);
  editingDomain=new AdapterFactoryEditingDomain(adapterFactory,commandStack,new HashMap<Resource,Boolean>());
}
 

Example 16

From project Holo-Edit, under directory /holoedit/gui/.

Source file: ConnectionPanel.java

  15 
vote

protected void fireOscAddressChanged(EventObject event,String newAdress){
  for (  ConnectionListener listener : getConnectionListeners()) {
    try {
      listener.oscAddressChanged(event,newAdress);
    }
 catch (    java.lang.IllegalArgumentException ex) {
      JOptionPane.showMessageDialog(null,ex.getMessage(),"error",JOptionPane.WARNING_MESSAGE);
    }
  }
}
 

Example 17

From project imageflow, under directory /src/de/danielsenff/imageflow/.

Source file: ImageFlow.java

  15 
vote

public boolean canExit(EventObject arg0){
  if (actsAsImagejPlugin) {
    getMainFrame().dispose();
    return false;
  }
  return true;
}
 

Example 18

From project ISAcreator, under directory /src/main/java/org/isatools/isacreator/factorlevelentry/.

Source file: FactorLevelEntryGUI.java

  15 
vote

public boolean editCellAt(int row,int col,EventObject e){
  TableCellEditor editor=getCellEditor(row,col);
  if (editor instanceof OntologyCellEditor) {
    if (e instanceof MouseEvent && ((MouseEvent)e).getClickCount() == 2) {
      super.editCellAt(row,col,e);
    }
  }
 else {
    super.editCellAt(row,col,e);
  }
  return false;
}
 

Example 19

From project jMemorize, under directory /src/jmemorize/gui/swing/widgets/.

Source file: CategoryTree.java

  15 
vote

/** 
 * @see javax.swing.tree.DefaultTreeCellEditor#isCellEditable
 */
public boolean isCellEditable(EventObject event){
  if (event != null) {
    MouseEvent mEvent=(MouseEvent)event;
    TreePath path=getPathForLocation(mEvent.getX(),mEvent.getY());
    if (path != null) {
      m_editedNode=(DefaultMutableTreeNode)path.getLastPathComponent();
      m_editedCategory=(Category)m_editedNode.getUserObject();
    }
  }
  return super.isCellEditable(event) && m_editedCategory != m_rootCategory;
}
 

Example 20

From project Konsolenradio, under directory /src/main/resources/tritonus/src/classes/org/tritonus/share/.

Source file: TNotifier.java

  15 
vote

public void addEntry(EventObject event,Collection<LineListener> listeners){
synchronized (m_entries) {
    m_entries.add(new NotifyEntry(event,listeners));
    m_entries.notifyAll();
  }
}
 

Example 21

From project LateralGM, under directory /org/lateralgm/components/impl/.

Source file: GmTreeEditor.java

  15 
vote

public boolean isCellEditable(EventObject event){
  if (event != null && event.getSource() instanceof JTree && event instanceof MouseEvent) {
    TreePath path=tree.getPathForLocation(((MouseEvent)event).getX(),((MouseEvent)event).getY());
    if (path != null && path.getPathCount() <= 2 && !Prefs.renamableRoots)     return false;
  }
 else   if (event == null) {
    ResNode node=((ResNode)tree.getLastSelectedPathComponent());
    if (node != null) {
      if (Prefs.renamableRoots)       return true;
      if (node.status != ResNode.STATUS_PRIMARY)       return node.isEditable();
      return false;
    }
  }
  return super.isCellEditable(event);
}
 

Example 22

From project litle-sdk-for-java, under directory /lib/xerces-2_11_0/samples/ui/.

Source file: TreeView.java

  15 
vote

/** 
 * This function delivers TextListener events, when the ok button is clicked.
 * @param evt The event to deliver.
 */
protected void deliverEvent(EventObject evt){
  if (evt instanceof TextEvent) {
    TextEvent event=(TextEvent)evt;
    Vector l;
synchronized (textListeners) {
      l=(Vector)textListeners.clone();
    }
    int size=l.size();
    for (int i=0; i < size; i++)     ((TextListener)l.elementAt(i)).textValueChanged(event);
  }
}
 

Example 23

From project log4jna, under directory /thirdparty/log4j/src/main/java/org/apache/log4j/lf5/viewer/categoryexplorer/.

Source file: CategoryAbstractCellEditor.java

  15 
vote

public boolean isCellEditable(EventObject anEvent){
  if (anEvent instanceof MouseEvent) {
    if (((MouseEvent)anEvent).getClickCount() < _clickCountToStart) {
      return false;
    }
  }
  return true;
}
 

Example 24

From project maven3-support, under directory /maven3-plugin/src/main/java/org/hudsonci/maven/plugin/install/.

Source file: SlaveBundleInstaller.java

  15 
vote

/** 
 * Handles installation onto the master node.
 */
public void consume(final EventObject event) throws Exception {
  if (event instanceof ReadyEvent) {
    ReadyEvent target=(ReadyEvent)event;
    FilePath root=target.getHudson().getRootPath();
    if (install(root,null)) {
      log.info("Maven slave bundle installed");
    }
  }
}
 

Example 25

From project mwe, under directory /plugins/org.eclipse.emf.mwe.ewm.editor/src/org/eclipse/emf/mwe/ewm/orchestration/presentation/.

Source file: OrchestrationEditor.java

  15 
vote

/** 
 * This sets up the editing domain for the model editor. <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
protected void initializeEditingDomain(){
  adapterFactory=new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
  adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
  adapterFactory.addAdapterFactory(new WorkflowItemProviderAdapterFactory());
  adapterFactory.addAdapterFactory(new OrchestrationItemProviderAdapterFactory());
  adapterFactory.addAdapterFactory(new RuntimeItemProviderAdapterFactory());
  adapterFactory.addAdapterFactory(new StateItemProviderAdapterFactory());
  adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
  adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
  BasicCommandStack commandStack=new BasicCommandStack();
  commandStack.addCommandStackListener(new CommandStackListener(){
    public void commandStackChanged(    final EventObject event){
      getContainer().getDisplay().asyncExec(new Runnable(){
        public void run(){
          firePropertyChange(IEditorPart.PROP_DIRTY);
          Command mostRecentCommand=((CommandStack)event.getSource()).getMostRecentCommand();
          if (mostRecentCommand != null) {
            setSelectionToViewer(mostRecentCommand.getAffectedObjects());
          }
          if (propertySheetPage != null && !propertySheetPage.getControl().isDisposed()) {
            propertySheetPage.refresh();
          }
        }
      }
);
    }
  }
);
  editingDomain=new AdapterFactoryEditingDomain(adapterFactory,commandStack,new HashMap<Resource,Boolean>());
}
 

Example 26

From project niravCS2103, under directory /CS2103/lib/apache-log4j-1.2.16/src/main/java/org/apache/log4j/lf5/viewer/categoryexplorer/.

Source file: CategoryAbstractCellEditor.java

  15 
vote

public boolean isCellEditable(EventObject anEvent){
  if (anEvent instanceof MouseEvent) {
    if (((MouseEvent)anEvent).getClickCount() < _clickCountToStart) {
      return false;
    }
  }
  return true;
}
 

Example 27

From project OMS3, under directory /src/main/java/oms3/dsl/cosu/.

Source file: Glue.java

  15 
vote

@Override public void run(){
  System.out.println("Execute");
  try {
    OutputStragegy st;
    if (output == null) {
      st=new SimpleDirectoryOutput(new File(System.getProperty("user.dir")),getName());
    }
 else {
      st=output.getOutputStrategy(getName());
    }
    File outFolder=st.nextOutputFolder();
    Compound comp=(Compound)model.getComponent();
    comp.addListener(new Listener(){
      @Override public void notice(      Type T,      EventObject E){
        if (T == Type.OUT) {
          DataflowEvent e=(DataflowEvent)E;
          System.out.println(e.getAccess().getField().getName() + " in " + e.getAccess().getComponent());
        }
      }
    }
);
    GLUE glue=new GLUE(model.getParameter());
    for (int i=0; i < count; i++) {
      System.out.println("Glue run #" + i);
      glue.newParamSet();
      Map<String,Object> p=model.getParameter();
      ComponentAccess.setInputData(p,comp,log);
      comp.execute();
    }
    comp.finalizeComponents();
  }
 catch (  Exception E) {
    E.printStackTrace();
  }
}
 

Example 28

From project org.openscada.dakara, under directory /org.openscada.vi.model.editor/src/org/openscada/vi/model/VisualInterface/presentation/.

Source file: VisualInterfaceEditor.java

  15 
vote

/** 
 * This sets up the editing domain for the model editor. <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
protected void initializeEditingDomain(){
  adapterFactory=new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
  adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
  adapterFactory.addAdapterFactory(new VisualInterfaceItemProviderAdapterFactory());
  adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
  BasicCommandStack commandStack=new BasicCommandStack();
  commandStack.addCommandStackListener(new CommandStackListener(){
    public void commandStackChanged(    final EventObject event){
      getContainer().getDisplay().asyncExec(new Runnable(){
        public void run(){
          firePropertyChange(IEditorPart.PROP_DIRTY);
          Command mostRecentCommand=((CommandStack)event.getSource()).getMostRecentCommand();
          if (mostRecentCommand != null) {
            setSelectionToViewer(mostRecentCommand.getAffectedObjects());
          }
          if (propertySheetPage != null && !propertySheetPage.getControl().isDisposed()) {
            propertySheetPage.refresh();
          }
        }
      }
);
    }
  }
);
  editingDomain=new AdapterFactoryEditingDomain(adapterFactory,commandStack,new HashMap<Resource,Boolean>());
}
 

Example 29

From project OWASP-WebScarab, under directory /src/org/owasp/webscarab/util/swing/.

Source file: JTreeTable.java

  15 
vote

/** 
 * Overridden to return false, and if the event is a mouse event it is forwarded to the tree.<p> The behavior for this is debatable, and should really be offered as a property. By returning false, all keyboard actions are implemented in terms of the table. By returning true, the tree would get a chance to do something with the keyboard events. For the most part this is ok. But for certain keys, such as left/right, the tree will expand/collapse where as the table focus should really move to a different column. Page up/down should also be implemented in terms of the table. By returning false this also has the added benefit that clicking outside of the bounds of the tree node, but still in the tree column will select the row, whereas if this returned true that wouldn't be the case. <p>By returning false we are also enforcing the policy that the tree will never be editable (at least by a key sequence).
 */
public boolean isCellEditable(EventObject e){
  if (e instanceof MouseEvent) {
    for (int counter=getColumnCount() - 1; counter >= 0; counter--) {
      if (getColumnClass(counter) == TreeTableModel.class) {
        MouseEvent me=(MouseEvent)e;
        MouseEvent newME=new MouseEvent(tree,me.getID(),me.getWhen(),me.getModifiers(),me.getX() - getCellRect(0,counter,true).x,me.getY(),me.getClickCount(),me.isPopupTrigger());
        tree.dispatchEvent(newME);
        break;
      }
    }
  }
  return false;
}
 

Example 30

From project packetsamurai, under directory /src/com/l2j/packetsamurai/gui/protocoleditor/.

Source file: TreeTableComboBoxCellEditor.java

  15 
vote

public boolean isCellEditable(EventObject e){
  if (e instanceof MouseEvent) {
    MouseEvent me=(MouseEvent)e;
    if (me.getClickCount() >= 2) {
      return true;
    }
    return false;
  }
  if (e == null) {
    return true;
  }
  return false;
}
 

Example 31

From project savara-tools-eclipse, under directory /plugins/org.savara.tools.scenario/src/main/java/org/savara/tools/scenario/designer/editor/properties/.

Source file: DesignerTabbedPropertySheetPage.java

  15 
vote

/** 
 * This is the constructor for the designer tabbed property page.
 * @param tabbedPropertySheetPageContributor
 */
public DesignerTabbedPropertySheetPage(ITabbedPropertySheetPageContributor contributor,CommandStack commandStack){
  super(contributor);
  m_commandStack=commandStack;
  m_contributor=contributor;
  m_commandStack.addCommandStackListener(new CommandStackListener(){
    @Override public void commandStackChanged(    EventObject arg0){
      DesignerTabbedPropertySheetPage.this.refresh();
    }
  }
);
}
 

Example 32

From project SIARD-Val, under directory /SIARD-Val/external-sources/log4j-1.2.12/java/org/apache/log4j/lf5/viewer/categoryexplorer/.

Source file: CategoryAbstractCellEditor.java

  15 
vote

public boolean isCellEditable(EventObject anEvent){
  if (anEvent instanceof MouseEvent) {
    if (((MouseEvent)anEvent).getClickCount() < _clickCountToStart) {
      return false;
    }
  }
  return true;
}
 

Example 33

From project wrml-prototype, under directory /src/main/java/org/wrml/core/event/.

Source file: DelegatingEventListenerList.java

  15 
vote

@Override public void fireEvent(String eventName,EventObject event){
  if (_EventListenerPrototype == null) {
    _EventListenerPrototype=EventListenerPrototype.forEventListenerClass(getEventListenerElementType());
  }
  _EventListenerPrototype.fireEvent(eventName,event,getDelegate());
}