Java Code Examples for java.beans.PropertyChangeEvent

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 addis, under directory /application/src/test/java/org/drugis/addis/presentation/.

Source file: FrequencyMeasurementPresentationTest.java

  18 
vote

@Test public void testFireLabelMaleChanged(){
  AbstractValueModel lm=d_pm.getLabelModel();
  PropertyChangeListener mock=createMock(PropertyChangeListener.class);
  PropertyChangeEvent event=new PropertyChangeEvent(lm,"value",null,"Male = 1 / Female = N/A");
  mock.propertyChange(JUnitUtil.eqPropertyChangeEvent(event));
  expectLastCall().anyTimes();
  replay(mock);
  PropertyChangeListener l=mock;
  lm.addPropertyChangeListener(l);
  d_measurement.setFrequency("Male",1);
  verify(l);
}
 

Example 2

From project beanmill_1, under directory /src/main/java/com/traxel/lumbermill/event/.

Source file: EventListener.java

  18 
vote

/** 
 * DOCUMENT ME!
 * @param property  DOCUMENT ME!
 * @param oldValue  DOCUMENT ME!
 * @param newValue  DOCUMENT ME!
 */
protected void firePropertyChange(final String property,final Object oldValue,final Object newValue){
  final PropertyChangeEvent event=new PropertyChangeEvent(this,property,oldValue,newValue);
synchronized (listeners) {
    final Iterator<PropertyChangeListener> it=listeners.iterator();
    while (it.hasNext()) {
      it.next().propertyChange(event);
    }
  }
}
 

Example 3

From project big-data-plugin, under directory /test-src/org/pentaho/di/ui/job/entries/sqoop/.

Source file: AbstractSqoopJobEntryControllerTest.java

  18 
vote

@Test public void setModeToggleLabel(){
  AbstractSqoopJobEntryController controller=new TestSqoopJobEntryController();
  PersistentPropertyChangeListener l=new PersistentPropertyChangeListener();
  controller.addPropertyChangeListener(l);
  String label="test label";
  controller.setModeToggleLabel(label);
  assertEquals(label,controller.getModeToggleLabel());
  assertEquals(1,l.getReceivedEvents().size());
  PropertyChangeEvent event=l.getReceivedEvents().get(0);
  assertEquals("modeToggleLabel",event.getPropertyName());
  assertNull(event.getOldValue());
  assertEquals(label,event.getNewValue());
}
 

Example 4

From project ceres, under directory /ceres-binding/src/main/java/com/bc/ceres/binding/.

Source file: PropertyDescriptor.java

  18 
vote

private void firePropertyChange(String propertyName,Object newValue,Object oldValue){
  if (attributeChangeSupport == null) {
    return;
  }
  PropertyChangeListener[] propertyChangeListeners=getAttributeChangeListeners();
  PropertyChangeEvent evt=new PropertyChangeEvent(this,propertyName,oldValue,newValue);
  for (  PropertyChangeListener propertyChangeListener : propertyChangeListeners) {
    propertyChangeListener.propertyChange(evt);
  }
}
 

Example 5

From project chatbots-library, under directory /distribution/src/codeanticode/chatbots/alice/.

Source file: Context.java

  18 
vote

public void property(String name,Object value){
  ContextPropertyChangeListener listener=listeners.get(name);
  if (listener != null) {
    Object oldValue=properties.get(name);
    PropertyChangeEvent event=new PropertyChangeEvent(this,name,oldValue,value);
    listener.propertyChange(event);
  }
  properties.put(name,value);
}
 

Example 6

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

Source file: ObserverManager.java

  18 
vote

public void firePropertyChange(String propertyName,Object oldValue,Object newValue){
  PropertyChangeEvent event=new PropertyChangeEvent(d_source,propertyName,oldValue,newValue);
  PropertyChangeListener[] arr;
synchronized (d_listeners) {
    arr=d_listeners.toArray(LISTENER_ARRAY);
  }
  for (  PropertyChangeListener l : arr) {
    l.propertyChange(event);
  }
}
 

Example 7

From project ANNIS, under directory /annis-kickstarter/src/main/java/de/hu_berlin/german/korpling/annis/kickstarter/.

Source file: MainFrame.java

  15 
vote

/** 
 * Creates new form MainFrame
 */
public MainFrame(){
  Integer[] sizes=new Integer[]{192,128,64,48,32,16,14};
  List<Image> allImages=new LinkedList<Image>();
  for (  int s : sizes) {
    try {
      BufferedImage imgIcon=ImageIO.read(MainFrame.class.getResource("logo/annis_" + s + ".png"));
      allImages.add(imgIcon);
    }
 catch (    IOException ex) {
      log.error(null,ex);
    }
  }
  this.setIconImages(allImages);
  System.setProperty("annis.home",".");
  this.corpusAdministration=(CorpusAdministration)AnnisBaseRunner.getBean("corpusAdministration",true,"file:" + Utils.getAnnisFile("conf/spring/Admin.xml").getAbsolutePath());
  try {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
  }
 catch (  Exception ex) {
    log.error(null,ex);
  }
  initComponents();
  serviceWorker=new MainFrameWorker();
  serviceWorker.addPropertyChangeListener(new PropertyChangeListener(){
    public void propertyChange(    PropertyChangeEvent evt){
      if (serviceWorker.getProgress() == 1) {
        pbStart.setIndeterminate(true);
        lblStatusService.setText("<html>Starting ANNIS...</html>");
        lblStatusService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/de/hu_berlin/german/korpling/annis/kickstarter/crystal_icons/quick_restart.png")));
      }
    }
  }
);
  if (isInitialized()) {
    btImport.setEnabled(true);
    btList.setEnabled(true);
    serviceWorker.execute();
  }
}
 

Example 8

From project asterisk-java, under directory /src/test/java/org/asteriskjava/live/internal/.

Source file: AsteriskAgentImplTest.java

  15 
vote

/** 
 * Test method for {@link org.asteriskjava.live.internal.AsteriskAgentImpl#updateState(org.asteriskjava.live.AgentState)}.
 */
@Test public void testUpdateStatus(){
  assertEquals(AgentState.AGENT_IDLE,agent.getState());
  agent.addPropertyChangeListener(new PropertyChangeListener(){
    public void propertyChange(    PropertyChangeEvent evt){
      assertEquals("wrong propertyName","state",evt.getPropertyName());
      assertEquals("wrong oldValue",AgentState.AGENT_IDLE,evt.getOldValue());
      assertEquals("wrong newValue",AgentState.AGENT_RINGING,evt.getNewValue());
      assertEquals("wrong queue",agent,evt.getSource());
      numberOfChanges++;
    }
  }
);
  agent.updateState(AgentState.AGENT_RINGING);
  assertEquals("wrong number of propagated changes",1,numberOfChanges);
}
 

Example 9

From project autopsy, under directory /Core/src/org/sleuthkit/autopsy/corecomponents/.

Source file: AbstractDataResultViewer.java

  15 
vote

/** 
 * Propagates changes in the current select node from the DataResultViewer to the DataContentTopComponent
 * @param evt
 */
@Override public void propertyChange(PropertyChangeEvent evt){
  String changed=evt.getPropertyName();
  if (changed.equals(ExplorerManager.PROP_SELECTED_NODES)) {
    this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
    try {
      Node selectedNode=this.getSelectedNode();
      DataContent dataContent=Lookup.getDefault().lookup(DataContent.class);
      if (selectedNode != null) {
        Node newSelectedNode=selectedNode;
        dataContent.setNode(newSelectedNode);
      }
 else {
        dataContent.setNode(null);
      }
    }
  finally {
      this.setCursor(null);
    }
  }
}
 

Example 10

From project beam-meris-icol, under directory /src/main/java/org/esa/beam/meris/icol/ui/.

Source file: IcolForm.java

  15 
vote

IcolForm(AppContext appContext,IcolModel icolModel,TargetProductSelector targetProductSelector){
  this.appContext=appContext;
  bc=new BindingContext(icolModel.getPropertyContainer());
  this.targetProductSelector=targetProductSelector;
  sourceProductSelector=new SourceProductSelector(appContext,"Input-Product (MERIS L1b, Landsat5 TM or Landsat7 ETM+):");
  cloudProductSelector=new SourceProductSelector(appContext,"Cloud-Product:");
  initComponents();
  JComboBox sourceComboBox=sourceProductSelector.getProductNameComboBox();
  final PropertyContainer valueContainer=targetProductSelector.getModel().getValueContainer();
  sourceComboBox.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      updateProductTypeSettings();
      if (isEnvisatSourceProduct(IcolForm.this.sourceProductSelector.getSelectedProduct()) && radianceProductTypeButton.isSelected()) {
        valueContainer.setValue("formatName",EnvisatConstants.ENVISAT_FORMAT_NAME);
      }
    }
  }
);
  PropertyChangeListener formatNameChangeListener=new PropertyChangeListener(){
    @Override public void propertyChange(    PropertyChangeEvent evt){
      updateProductFormatChange();
    }
  }
;
  valueContainer.addPropertyChangeListener("formatName",formatNameChangeListener);
  icolContainer=icolModel.getPropertyContainer();
  bindComponents();
  updateUIStates();
}
 

Example 11

From project BMach, under directory /src/jsyntaxpane/components/.

Source file: LineNumbersRuler.java

  15 
vote

/** 
 * Implement PropertyChangeListener interface
 */
@Override public void propertyChange(PropertyChangeEvent evt){
  if (evt.getPropertyName().equals("document")) {
    if (evt.getOldValue() instanceof SyntaxDocument) {
      SyntaxDocument syntaxDocument=(SyntaxDocument)evt.getOldValue();
      syntaxDocument.removeDocumentListener(this);
    }
    if (evt.getNewValue() instanceof SyntaxDocument && status.equals(Status.INSTALLING)) {
      SyntaxDocument syntaxDocument=(SyntaxDocument)evt.getNewValue();
      syntaxDocument.addDocumentListener(this);
      setPreferredWidth();
      repaint();
    }
  }
 else   if (evt.getNewValue() instanceof Font) {
    setPreferredWidth();
    repaint();
  }
}
 

Example 12

From project bndtools, under directory /bndtools.core/src/bndtools/editor/.

Source file: BndEditorContentOutlineProvider.java

  15 
vote

public void propertyChange(PropertyChangeEvent evt){
  if (Constants.EXPORT_PACKAGE.equals(evt.getPropertyName())) {
    viewer.refresh(EXPORTS);
    viewer.expandToLevel(EXPORTS,1);
  }
 else   if (Constants.PRIVATE_PACKAGE.equals(evt.getPropertyName())) {
    viewer.refresh(PRIVATE_PKGS);
    viewer.expandToLevel(PRIVATE_PKGS,1);
  }
 else   if (Constants.IMPORT_PACKAGE.equals(evt.getPropertyName())) {
    viewer.refresh(IMPORT_PATTERNS);
    viewer.expandToLevel(IMPORT_PATTERNS,1);
  }
 else   if (Constants.PLUGIN.equals(evt.getPropertyName())) {
    viewer.refresh(PLUGINS);
    viewer.expandToLevel(PLUGINS,1);
  }
}
 

Example 13

From project c3p0, under directory /src/java/com/mchange/v2/c3p0/.

Source file: DriverManagerDataSource.java

  15 
vote

private void setUpPropertyListeners(){
  PropertyChangeListener driverClassListener=new PropertyChangeListener(){
    public void propertyChange(    PropertyChangeEvent evt){
      if ("driverClass".equals(evt.getPropertyName()))       setDriverClassLoaded(false);
    }
  }
;
  this.addPropertyChangeListener(driverClassListener);
}
 

Example 14

From project Calendar-Application, under directory /com/toedter/calendar/demo/.

Source file: JCalendarDemo.java

  15 
vote

/** 
 * The applet is a PropertyChangeListener for "locale" and "calendar".
 * @param evt Description of the Parameter
 */
public void propertyChange(PropertyChangeEvent evt){
  if (calendarPanel != null) {
    if (evt.getPropertyName().equals("calendar")) {
    }
  }
}
 

Example 15

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

Source file: BroadcastFileContentsDetailWindow.java

  15 
vote

public BroadcastFileContentsDetailWindow(DetailDataSource dataSource,Row selectedFileRow) throws Exception {
  super("",true,true,true,true);
  this.dataSource=dataSource;
  GuiContext guiContext=dataSource.getGuiContext();
  translationNotifier=InternationalizationUtil.retrieveTranslationNotifier(guiContext);
  translationManager=InternationalizationUtil.retrieveTranslationManager(guiContext);
  if (selectedFileRow == null) {
    throw new IllegalStateException(translationManager.translate("BroadcastError.noFatherRow",translationNotifier.getLanguage()));
  }
  fileId.setText(selectedFileRow.getFieldValue("fileId"));
  fillSectionComboBox();
  declareFields(dataSource);
  sectionId.putClientProperty(DetailDataSource.UPDATE_PRIORITY,DetailDataSource.LOW_PRIORITY);
  buttonPanelLogic.setMainDataSource(dataSource);
  dataSource.load();
  initGui();
  sectionId.putClientProperty(FieldType.EDIT_MODE,FieldType.NOT_UPDATABLE);
  DetailWindowUtil.manageEditModeFields(dataSource);
  sectionId.getDataSource().addPropertyChangeListener(DataSource.SELECTED_ROW_PROPERTY,new PropertyChangeListener(){
    public void propertyChange(    PropertyChangeEvent evt){
      try {
        manageOptionPanel();
      }
 catch (      RequestException ex) {
        ErrorDialog.show(BroadcastFileContentsDetailWindow.this,translationManager.translate("BroadcastFileContentsDetailWindow.unableToDisplayParameters",translationNotifier.getLanguage()),ex);
      }
    }
  }
);
  manageOptionPanel();
  translationNotifier.addInternationalizableContainer(this);
}
 

Example 16

From project codjo-data-process, under directory /codjo-data-process-gui/src/main/java/net/codjo/dataprocess/gui/launcher/.

Source file: ExecutionListProgress.java

  15 
vote

public void propertyChange(PropertyChangeEvent evt){
  String type=evt.getPropertyName();
  if (STOP_EVENT.equals(type)) {
    stop=true;
  }
}
 

Example 17

From project codjo-imports, under directory /codjo-imports-gui/src/main/java/net/codjo/imports/gui/wizard/.

Source file: ImportSelectionStep.java

  15 
vote

@Override public void initGui(){
  errorLabel.setForeground(Color.RED);
  importTypeCombo.setModelFieldName("fileType");
  try {
    Result result=selector.selectImportItems(new String[]{"importSettingsId","fileType"});
    importTypeCombo.getDataSource().setLoadResult(result);
  }
 catch (  RequestException ex) {
    ErrorDialog.show(this,translate("ImportSelectionStep.initGui.loadErrorMessage",guiContext),ex);
  }
  importTypeCombo.getDataSource().addPropertyChangeListener(DataSource.SELECTED_ROW_PROPERTY,new PropertyChangeListener(){
    public void propertyChange(    PropertyChangeEvent evt){
      checkFulfilled();
    }
  }
);
  importFilePath.getFileNameField().getDocument().addDocumentListener(new DocumentListener(){
    public void changedUpdate(    DocumentEvent evt){
      checkFulfilled();
    }
    public void insertUpdate(    DocumentEvent evt){
      checkFulfilled();
    }
    public void removeUpdate(    DocumentEvent evt){
      checkFulfilled();
    }
  }
);
  TranslationNotifier notifier=InternationalizationUtil.retrieveTranslationNotifier(guiContext);
  importFilePath.setTranslationBackpack(InternationalizationUtil.retrieveTranslationManager(guiContext),notifier);
  importFilePath.setWithAccessories(false);
  FileChooserUtils.setUILanguage(notifier.getLanguage().getLocale());
}
 

Example 18

From project codjo-segmentation, under directory /codjo-segmentation-gui/src/main/java/net/codjo/segmentation/gui/importParam/.

Source file: ImportParametersGui.java

  15 
vote

private void initListeners(){
  importFileName.addPropertyChangeListener("fileName",new PropertyChangeListener(){
    public void propertyChange(    PropertyChangeEvent evt){
      importButton.setEnabled(!("".equals(evt.getNewValue())));
    }
  }
);
  cancelButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent event){
      dispose();
    }
  }
);
  classificationRadio.addActionListener(new TableListenerEvent("axeImportAnomaly",axeImportAnomaly));
  sleeveRadio.addActionListener(new TableListenerEvent("sleeveImportAnomaly",sleeveImportAnomaly));
  ClearLogButtonUpdater actionUpdater=new ClearLogButtonUpdater();
  axeImportAnomaly.getDataSource().addPropertyChangeListener(actionUpdater);
  sleeveImportAnomaly.getDataSource().addPropertyChangeListener(actionUpdater);
}
 

Example 19

From project codjo-standalone-common, under directory /src/main/java/net/codjo/gui/.

Source file: ExplorerPeriodFilter.java

  15 
vote

/** 
 * Ecoutes le changement de la p?iode courante.
 */
public void propertyChange(PropertyChangeEvent evt){
  if (modelPeriod.getIndexOf(evt.getNewValue()) < 0) {
    initComponent();
  }
  periodComboBox.setSelectedItem(evt.getNewValue());
}
 

Example 20

From project contribution_eevolution_smart_browser, under directory /client/src/org/compiere/apps/.

Source file: ProcessParameterPanel.java

  15 
vote

/** 
 * Editor Listener
 * @param evt Event
 * @exception PropertyVetoException if the recipient wishes to roll back.
 */
public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException {
  if (evt.getSource() instanceof VEditor) {
    GridField changedField=((VEditor)evt.getSource()).getField();
    if (changedField != null) {
      processDependencies(changedField);
    }
  }
  processNewValue(evt.getNewValue(),evt.getPropertyName());
}
 

Example 21

From project cowgraph, under directory /CowGraph/CowGraphVisualEditor/src/zbeans/cowgraph/visual/editor/.

Source file: CowGraphVisualEditorScene.java

  15 
vote

@Override public void propertyChange(PropertyChangeEvent evt){
  if (evt.getPropertyName().equals(ObservableBean.getCollectionElementAddedPropertyName(CowGraphVersion.PROP_ELEMENTS))) {
    this.addNode((GraphElement)evt.getNewValue());
    if (SwingUtilities.isEventDispatchThread()) {
      repaint();
      getScene().validate();
    }
 else {
      SwingUtilities.invokeLater(new Runnable(){
        @Override public void run(){
          repaint();
          getScene().validate();
        }
      }
);
    }
  }
 else   if (evt.getPropertyName().equals(ObservableBean.getCollectionElementRemovedPropertyName(CowGraphVersion.PROP_ELEMENTS))) {
    GraphElement element=(GraphElement)evt.getOldValue();
  }
}
 

Example 22

From project cytoscape-plugins, under directory /org.openbel.cytoscape.navigator/src/org/openbel/cytoscape/navigator/dialog/.

Source file: KnowledgeNeighborhoodDialog.java

  15 
vote

/** 
 * {@inheritDoc}
 */
@Override public void propertyChange(PropertyChangeEvent e){
  if (e == null) {
    return;
  }
  if (CytoscapeDesktop.NETWORK_VIEW_CREATED.equals(e.getPropertyName())) {
    CyNetworkView view=(CyNetworkView)e.getNewValue();
    view.getNetwork().addSelectEventListener(this);
    subjectNetworks.add(view.getNetwork());
  }
 else   if (CytoscapeDesktop.NETWORK_VIEW_DESTROYED.equals(e.getPropertyName())) {
    CyNetworkView view=(CyNetworkView)e.getNewValue();
    view.getNetwork().removeSelectEventListener(this);
    subjectNetworks.remove(view.getNetwork());
  }
}
 

Example 23

From project data-access, under directory /src/org/pentaho/platform/dataaccess/datasource/ui/importing/.

Source file: ImportDialogController.java

  15 
vote

public void propertyChange(PropertyChangeEvent propertyChangeEvent){
  XulFileUpload uploadControl=(XulFileUpload)propertyChangeEvent.getSource();
  String value=uploadControl.getSeletedFile();
  if (!StringUtils.isEmpty(value)) {
    uploadControl.addParameter("file_name",uploadControl.getSeletedFile());
    uploadControl.addParameter("mark_temporary","true");
    uploadControl.addParameter("unzip","true");
    uploadControl.submit();
  }
}
 

Example 24

From project dawn-common, under directory /org.dawb.hdf5/src/ncsa/hdf/view/.

Source file: DefaultImageView.java

  15 
vote

/** 
 * Listen to the text field. This method detects when the value of the text field changes.
 */
public void propertyChange(PropertyChangeEvent e){
  Object source=e.getSource();
  if ("value".equals(e.getPropertyName())) {
    Number num=(Number)e.getNewValue();
    if (num == null) {
      return;
    }
    double value=num.doubleValue();
    if (source.equals(minField) && (minSlider != null) && minSlider.isEnabled()) {
      int maxValue=maxSlider.getValue();
      if (value > maxValue) {
        value=maxValue;
        minField.setText(String.valueOf(value));
      }
      minSlider.setValue((int)value);
    }
 else     if (source.equals(maxField) && (maxSlider != null) && minSlider.isEnabled()) {
      int minValue=minSlider.getValue();
      if (value < minValue) {
        value=minValue;
        maxField.setText(String.valueOf(value));
      }
      maxSlider.setValue((int)value);
    }
  }
}
 

Example 25

From project dawn-isencia, under directory /com.isencia.passerelle.commons/src/main/java/com/isencia/util/swing/calendar/.

Source file: DateSelector.java

  15 
vote

public void propertyChange(PropertyChangeEvent evt){
  if (evt.getPropertyName().equals("calendar")) {
    calendar=(Calendar)evt.getNewValue();
    txtDateField.setText(formatter.format(calendar.getTime()));
  }
  if (evt.getPropertyName().equals("closeMe")) {
    calendar=(Calendar)evt.getNewValue();
    txtDateField.setText(formatter.format(calendar.getTime()));
    calendarPanel.setVisible(false);
    popup.setVisible(false);
  }
  if (evt.getPropertyName().equals("escape")) {
    calendar=oldCalendar;
    txtDateField.setText(formatter.format(calendar.getTime()));
    calendarPanel.setCalendar(calendar);
    calendarPanel.setVisible(false);
    popup.setVisible(false);
  }
}
 

Example 26

From project dawn-third, under directory /org.dawb.org.csstudio.swt.xygraph/src/org/csstudio/swt/xygraph/figures/.

Source file: Legend.java

  15 
vote

public Legend(XYGraph xyGraph){
  xyGraph.getPlotArea().addPropertyChangeListener(PlotArea.BACKGROUND_COLOR,new PropertyChangeListener(){
    public void propertyChange(    PropertyChangeEvent evt){
      setBackgroundColor((Color)evt.getNewValue());
    }
  }
);
  setBackgroundColor(xyGraph.getPlotArea().getBackgroundColor());
  setForegroundColor(BLACK_COLOR);
  setOpaque(false);
  setOutline(true);
}
 

Example 27

From project Diver, under directory /org.eclipse.zest.custom.sequence/src/org/eclipse/zest/custom/sequence/figures/internal/.

Source file: AncestorHelper.java

  15 
vote

/** 
 * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent)
 */
public void propertyChange(PropertyChangeEvent event){
  if (event.getPropertyName().equals("parent")) {
    IFigure oldParent=(IFigure)event.getOldValue();
    IFigure newParent=(IFigure)event.getNewValue();
    if (oldParent != null) {
      removeAncestors(oldParent);
      fireAncestorRemoved(oldParent);
    }
    if (newParent != null) {
      addAncestors(newParent);
      fireAncestorAdded(newParent);
    }
  }
}
 

Example 28

From project droidex_1, under directory /src/com/commonsware/droidex/.

Source file: DroidEx.java

  15 
vote

private void initDeviceScreenView(){
  IImageProvider imageProvider=new DeviceScreenImageProvider(device);
  imageProvider.addImageFilter(new ScaleImageFilter(settings));
  imageProvider.addImageFilter(new RotateImageFilter(settings));
  imageProvider.addImageFilter(new RecordImageFilter(settings));
  deviceScreenView=new DeviceScreenView(imageProvider);
  deviceScreenView.setFrameRate(options.frameRate);
  deviceScreenView.play();
  settings.addPropertyChangeListener(new PropertyChangeListener(){
    public void propertyChange(    PropertyChangeEvent event){
      deviceScreenView.repaint();
    }
  }
);
}
 

Example 29

From project droolsjbpm-tools, under directory /drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/editors/rete/part/.

Source file: DiagramEditPart.java

  15 
vote

public void propertyChange(PropertyChangeEvent evt){
  String prop=evt.getPropertyName();
  if (ReteGraph.PROP_CHILD_ADDED.equals(prop) || ReteGraph.PROP_CHILD_REMOVED.equals(prop)) {
    refreshChildren();
  }
}
 

Example 30

From project e4-rendering, under directory /com.toedter.e4.ui.workbench.renderers.swing/src/com/toedter/e4/ui/workbench/renderers/swing/.

Source file: SashRenderer.java

  15 
vote

@Override public void hookControllerLogic(MUIElement element){
  if (element instanceof MPartSashContainer) {
    final MPartSashContainer partSashContainer=(MPartSashContainer)element;
    final JSplitPane splitPane=(JSplitPane)partSashContainer.getWidget();
    splitPane.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY,new PropertyChangeListener(){
      @Override public void propertyChange(      PropertyChangeEvent event){
        if (splitPane.getLeftComponent() != null && splitPane.getRightComponent() != null) {
          partSashContainer.setContainerData(((Integer)event.getNewValue()).toString());
        }
      }
    }
);
  }
}
 

Example 31

From project echo3, under directory /src/server-java/app/nextapp/echo/app/.

Source file: Table.java

  15 
vote

/** 
 * Creates a <code>Table</code> with the supplied  <code>TableModel</code> and the specified <code>TableColumnModel</code>.
 * @param model the initial model
 * @param columnModel the initial column model
 */
public Table(TableModel model,TableColumnModel columnModel){
  super();
  if (columnModel == null) {
    setColumnModel(new DefaultTableColumnModel());
    setAutoCreateColumnsFromModel(true);
  }
 else {
    setColumnModel(columnModel);
  }
  setSelectionModel(new DefaultListSelectionModel());
  setModel(model);
  addPropertyChangeListener(CHILD_VISIBLE_CHANGED_PROPERTY,new PropertyChangeListener(){
    public void propertyChange(    PropertyChangeEvent e){
      invalidate();
    }
  }
);
}