Package org.openpnp.gui.components.reticle

Examples of org.openpnp.gui.components.reticle.Reticle


                .setEnabled(getSelectedPlacement() != null);
            Placement placement = getSelectedPlacement();
            CameraView cameraView = MainFrame.cameraPanel.getSelectedCameraView();
            if (cameraView != null) {
                          if (placement != null) {
                                Reticle reticle = new PackageReticle(placement.getPart().getPackage());
                                cameraView.setReticle(JobPanel.this.getClass().getName(), reticle);
                          }
                          else {
                              cameraView.removeReticle(JobPanel.this.getClass().getName());
                          }
View Full Code Here


            placementSelectionActionGroup
                .setEnabled(getSelectedPlacement() != null);
           
                        Placement placement = getSelectedPlacement();
                        if (placement != null) {
                            Reticle reticle = new OutlineReticle(placement.getPart().getPackage().getOutline());
                            MainFrame.cameraPanel.getSelectedCameraView().setReticle(BoardsPanel.this.getClass().getName(), reticle);
                        }
                        else {
                            MainFrame.cameraPanel.getSelectedCameraView().removeReticle(BoardsPanel.this.getClass().getName());
                        }           
View Full Code Here

        deletePartAction.setEnabled(part != null);
       
            CameraView cameraView = MainFrame.cameraPanel.getSelectedCameraView();
            if (cameraView != null) {
                  if (part != null) {
                      Reticle reticle = new OutlineReticle(part.getPackage().getOutline());
                      MainFrame.cameraPanel.getSelectedCameraView().setReticle(PartsPanel.this.getClass().getName(), reticle);
                  }
                  else {
                      MainFrame.cameraPanel.getSelectedCameraView().removeReticle(PartsPanel.this.getClass().getName());
                  }                                      
View Full Code Here

        deletePackageAction.setEnabled(this_package != null);
       
                CameraView cameraView = MainFrame.cameraPanel.getSelectedCameraView();
                if (cameraView != null) {
                    if (this_package != null) {
                        Reticle reticle = new PackageReticle(this_package);
                        cameraView.setReticle(PackagesPanel.this.getClass().getName(), reticle);
                    }
                    else {
                        MainFrame.cameraPanel.getSelectedCameraView().removeReticle(PackagesPanel.this.getClass().getName());
                    }                                      
View Full Code Here

    ButtonGroup buttonGroup = new ButtonGroup();
   
    JRadioButtonMenuItem menuItem;
   
    Reticle reticle = cameraView.getDefaultReticle();
   
    menuItem = new JRadioButtonMenuItem(noReticleAction);
    if (reticle == null) {
      menuItem.setSelected(true);
    }
    buttonGroup.add(menuItem);
    menu.add(menuItem);
   
    menuItem = new JRadioButtonMenuItem(crosshairReticleAction);
    if (reticle != null && reticle.getClass() == CrosshairReticle.class) {
      menuItem.setSelected(true);
    }
    buttonGroup.add(menuItem);
    menu.add(menuItem);
   
    menuItem = new JRadioButtonMenuItem(rulerReticleAction);
    if (reticle != null && reticle.getClass() == RulerReticle.class) {
      menuItem.setSelected(true);
    }
    buttonGroup.add(menuItem);
    menu.add(menuItem);
   
    menuItem = new JRadioButtonMenuItem(fiducialReticleAction);
    if (reticle != null && reticle.getClass() == FiducialReticle.class) {
      menuItem.setSelected(true);
    }
    buttonGroup.add(menuItem);
    menu.add(menuItem);
   
View Full Code Here

    setBackground(Color.black);
    setOpaque(true);

    String reticlePref = prefs.get(PREF_RETICLE, null);
    try {
      Reticle reticle = (Reticle) XmlSerialize.deserialize(reticlePref);
      setDefaultReticle(reticle);
    }
    catch (Exception e) {
      // logger.warn("Warning: Unable to load Reticle preference");
    }
View Full Code Here

TOP

Related Classes of org.openpnp.gui.components.reticle.Reticle

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.