Package java.awt

Examples of java.awt.ItemSelectable


        //putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke('E', Toolkit.getDefaultToolkit().getMenuShortcutKeyMask() ));
        setEnabled(false);
    }

    public void actionPerformed(final ActionEvent e) {
        final ItemSelectable is = (ItemSelectable)e.getSource();
        final Object[] o = is.getSelectedObjects();
        try {
            String item = (String)o[0];
            if (item.endsWith("%")) item = item.substring(0, item.length()-1);
            final double zoomFactor = Double.parseDouble(item.trim());
            if (zoomFactor > 0) gcViewer.getSelectedGCDocument().getModelChart().setScaleFactor(zoomFactor/1000.0);
View Full Code Here


    action.setValue(FillingStyle.getStyle(getLabelText()));
  }

  @Override
  public boolean isConditionRespected() {
    final ItemSelectable is = interaction.getList();

    return is==instrument.fillStyleCB && instrument.pencil.isActivated();
  }
View Full Code Here

    action.setValue(FillingStyle.getStyle(getLabelText()));
  }

  @Override
  public boolean isConditionRespected() {
    final ItemSelectable is  = interaction.getList();

    return is==instrument.fillStyleCB && instrument.hand.isActivated();
  }
View Full Code Here

  /**
   * @return The selected text. Can be null.
   * @since 3.0
   */
  protected String getLabelText() {
    final ItemSelectable is   = interaction.getList();
    final Object[] selection = is.getSelectedObjects();

    return selection.length!=1 && ! (selection[0] instanceof JLabel) ? null : ((JLabel)selection[0]).getText();
  }
View Full Code Here

    action.setValue(ArrowStyle.getArrowStyle(getLabelText()));
  }

  @Override
  public boolean isConditionRespected() {
    final ItemSelectable is  = interaction.getList();
    return (is==instrument.arrowLeftCB || is==instrument.arrowRightCB) && instrument.pencil.isActivated();
  }
View Full Code Here

    action.setValue(ArrowStyle.getArrowStyle(getLabelText()));
  }

  @Override
  public boolean isConditionRespected() {
    final ItemSelectable is  = interaction.getList();
    return (is==instrument.arrowLeftCB || is==instrument.arrowRightCB) && instrument.hand.isActivated();
  }
View Full Code Here

      action.setValue(DotStyle.getStyle(getLabelText()));
    }

    @Override
    public boolean isConditionRespected() {
      final ItemSelectable is  = interaction.getList();
      return is==instrument.dotCB && instrument.hand.isActivated();
    }
View Full Code Here

    super(instrument, ModifyShapeProperty.class);
  }

  @Override
  public boolean isConditionRespected() {
    final ItemSelectable is = interaction.getList();
    return (is==instrument.bordersPosCB || is==instrument.lineCB) && instrument.hand.isActivated();
  }
View Full Code Here

    return (is==instrument.bordersPosCB || is==instrument.lineCB) && instrument.hand.isActivated();
  }

  @Override
  public void initAction() {
    final ItemSelectable is  = interaction.getList();
    action.setGroup(instrument.pencil.canvas().getDrawing().getSelection().duplicateDeep(false));

    if(is==instrument.bordersPosCB) {
      action.setProperty(ShapeProperties.BORDER_POS);
      action.setValue(BorderPos.getStyle(getLabelText()));
View Full Code Here

    super(instrument, ModifyPencilParameter.class);
  }

  @Override
  public void initAction() {
    final ItemSelectable is  = interaction.getList();
    action.setPencil(instrument.pencil);

    if(is==instrument.bordersPosCB) {
      action.setProperty(ShapeProperties.BORDER_POS);
      action.setValue(BorderPos.getStyle(getLabelText()));
View Full Code Here

TOP

Related Classes of java.awt.ItemSelectable

Copyright © 2018 www.massapicom. 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.