Tabnine Logo
Graphic.addPropertyChangeListener
Code IndexAdd Tabnine to your IDE (free)

How to use
addPropertyChangeListener
method
in
org.weasis.core.ui.model.graphic.Graphic

Best Java code snippets using org.weasis.core.ui.model.graphic.Graphic.addPropertyChangeListener (Showing top 5 results out of 315)

origin: nroduit/Weasis

@Override
public void addGraphicChangeHandler(PropertyChangeListener graphicsChangeHandler) {
  if (Objects.nonNull(graphicsChangeHandler) && !graphicsListeners.contains(graphicsChangeHandler)) {
    graphicsListeners.add(graphicsChangeHandler);
    models.forEach(g -> g.addPropertyChangeListener(graphicsChangeHandler));
  }
}
origin: nroduit/Weasis

public static void addGraphicToModel(ViewCanvas<?> canvas, GraphicLayer layer, Graphic graphic) {
  GraphicModel gm = canvas.getGraphicManager();
  graphic.setLayer(Optional.ofNullable(layer).orElseGet(() -> getOrBuildLayer(canvas, graphic.getLayerType())));
  graphic.updateLabel(Boolean.TRUE, canvas);
  for (PropertyChangeListener listener : canvas.getGraphicManager().getGraphicsListeners()) {
    graphic.addPropertyChangeListener(listener);
  }
  gm.addGraphic(graphic);
}
origin: nroduit/Weasis

public static Graphic drawFromCurrentGraphic(ViewCanvas<?> canvas, Graphic graphicCreator) {
  Objects.requireNonNull(canvas);
  Graphic newGraphic = Optional.ofNullable(graphicCreator).orElse(MeasureToolBar.selectionGraphic);
  GraphicLayer layer = getOrBuildLayer(canvas, newGraphic.getLayerType());
  if (!layer.getVisible() || !(Boolean) canvas.getActionValue(ActionW.DRAWINGS.cmd())) {
    JOptionPane.showMessageDialog(canvas.getJComponent(), Messages.getString("AbstractLayerModel.msg_not_vis"), //$NON-NLS-1$
      Messages.getString("AbstractLayerModel.draw"), //$NON-NLS-1$
      JOptionPane.ERROR_MESSAGE);
    return null;
  } else {
    Graphic graph = newGraphic.copy();
    if (graph != null) {
      graph.updateLabel(Boolean.TRUE, canvas);
      for (PropertyChangeListener listener : canvas.getGraphicManager().getGraphicsListeners()) {
        graph.addPropertyChangeListener(listener);
      }
      graph.setLayer(layer);
      canvas.getGraphicManager().addGraphic(graph);
    }
    return graph;
  }
}
origin: nroduit/Weasis

graphic.setLayer(layer);
for (PropertyChangeListener listener : modelList.getGraphicsListeners()) {
  graphic.addPropertyChangeListener(listener);
origin: nroduit/Weasis

graphic.addPropertyChangeListener(listener);
  graphic.addPropertyChangeListener(listener);
org.weasis.core.ui.model.graphicGraphicaddPropertyChangeListener

Popular methods of Graphic

  • getLayer
  • setLayer
  • setFilled
  • setLineThickness
  • setPaint
  • buildShape
  • copy
  • getColorPaint
    Returns graphic's color (Default value: Color.YELLOW)
  • getFilled
    Returns TRUE if the graphic is filled, FALSE otherwise (Default value: FALSE)
  • getGraphicLabel
  • getLabelVisible
  • getLineThickness
    Returns the line thickness value (default value: 1).
  • getLabelVisible,
  • getLineThickness,
  • getPts,
  • getShape,
  • setLabel,
  • setLabelVisible,
  • toBack,
  • toFront,
  • computeMeasurements

Popular in Java

  • Running tasks concurrently on multiple threads
  • runOnUiThread (Activity)
  • putExtra (Intent)
  • getApplicationContext (Context)
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Permission (java.security)
    Legacy security code; do not use.
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • JLabel (javax.swing)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now