/** Used internally for property changes */ public void propertyChange(PropertyChangeEvent event) { if (ignoreEvent_) { if (Debug.EVENT) System.out.println("Logo: ignore event"); return; } if (Debug.EVENT) { System.out.println("LogoDialog: " + event); System.out.println(" " + event.getPropertyName()); } if (event.getPropertyName().equals("location")) { Point2D.Double locp = logo_.getLocationP(); xPosTextField.setText(String.valueOf(locp.x)); yPosTextField.setText(String.valueOf(locp.y)); } }
private void updateLogo() { ignoreEvent_ = true; if (pane_ != null) pane_.setBatch(true, "LogoDialog"); // // options // logo_.setVisible(labelVisibleCheckBox.isSelected()); logo_.setSelectable(labelSelectableCheckBox.isSelected()); // // Location // double x = Double.valueOf(xPosTextField.getText()).doubleValue(); double y = Double.valueOf(yPosTextField.getText()).doubleValue(); Point2D.Double locp = new Point2D.Double(x, y); logo_.setLocationP(locp); // // alignment // logo_.setHAlign(horizComboBox.getSelectedIndex()); logo_.setVAlign(vertComboBox.getSelectedIndex()); if (pane_ != null) pane_.setBatch(false, "LogoDialog"); ignoreEvent_ = false; }
private void setLogo() { // // label Id // setTitle("Logo - " + logo_.getId()); // // options // labelVisibleCheckBox.setSelected(logo_.isVisible()); labelSelectableCheckBox.setSelected(logo_.isSelectable()); // // location // Point2D.Double locp = logo_.getLocationP(); xPosTextField.setText(String.valueOf(locp.x)); yPosTextField.setText(String.valueOf(locp.y)); // // alignment // horizComboBox.setSelectedIndex(logo_.getHAlign()); vertComboBox.setSelectedIndex(logo_.getVAlign()); }
private void finish() { logo_.removePropertyChangeListener(this); }
/** Set the <code>Logo</code> to be edited. */ public void setLogo(Logo logo) { logo_ = logo; logo_.addPropertyChangeListener(this); ignoreEvent_ = false; setLogo(); }