Package java.awt

Examples of java.awt.Point.translate()


      aboutMenuItem.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          JDialog aboutDialog = getAboutDialog();
          aboutDialog.pack();
          Point loc = getJFrame().getLocation();
          loc.translate(20, 20);
          aboutDialog.setLocation(loc);
          aboutDialog.setVisible(true);
        }
      });
    }
View Full Code Here


        public void actionPerformed(java.awt.event.ActionEvent e) {
          if (jTextFieldName.getText().equalsIgnoreCase("") ) {
            errorDialog = getErrorDialog();
            errorDialog.pack();
            Point loc = getJFrame().getLocation();
            loc.translate(60, 60);
            errorDialog.setLocation(loc);
            errorDialog.setVisible(true);
          }
          else {
            contactFilePath = filePath+ "/CONTACT";
View Full Code Here

              || jTextFieldAuthors.getText().equalsIgnoreCase("")
              || jTextFieldYear.getText().equalsIgnoreCase("")  ) {
            errorDialog = getErrorDialog();
            errorDialog.pack();
            Point loc = getJFrame().getLocation();
            loc.translate(60, 60);
            errorDialog.setLocation(loc);
            errorDialog.setVisible(true);
          }
          else {
            publicationFilePath = filePath+ "/PUBLICATION";
View Full Code Here

          if (jTextFieldLibName.getText().equalsIgnoreCase("")
              || jTextFieldOrganism.getText().equalsIgnoreCase("") ) {
            errorDialog = getErrorDialog();
            errorDialog.pack();
            Point loc = getJFrame().getLocation();
            loc.translate(60, 60);
            errorDialog.setLocation(loc);
            errorDialog.setVisible(true);
          }
          else {
            libraryFilePath = filePath+ "/LIBRARY";
View Full Code Here

      jButtonAdvanced.setText("Advanced Options");
      jButtonAdvanced.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent e) {
          getJFrameAdvanced();
          Point loc = getJFrame().getLocation();
          loc.translate(100, 100);
          jFrameAdvanced.setLocation(loc);
          jFrameAdvanced.setVisible(true);
        }
      });
    }
View Full Code Here

              || jTextFieldInputFasta.getText().equalsIgnoreCase("")
            ) {
            errorDialog = getErrorDialog();
            errorDialog.pack();
            Point loc = getJFrame().getLocation();
            loc.translate(60, 60);
            errorDialog.setLocation(loc);
            errorDialog.setVisible(true);
          }
          else {
            estFilePath = filePath+ "/EST";
View Full Code Here

          comp = wh.getMasterFrame().getWindow();
          p = new Point( comp.getWidth() >> 1, comp.getHeight() >> 1 );
        }
       } else {
        p = comp.getLocation();
        p.translate( comp.getWidth() >> 1, comp.getHeight() >> 1 );
      }
      final Point p2 = SwingUtilities.convertPoint( comp, p, c );
      p2.translate( -(c.getWidth() >> 1), -(c.getHeight() >> 1) );
      c.setLocation( p2 );
    }
View Full Code Here

       } else {
        p = comp.getLocation();
        p.translate( comp.getWidth() >> 1, comp.getHeight() >> 1 );
      }
      final Point p2 = SwingUtilities.convertPoint( comp, p, c );
      p2.translate( -(c.getWidth() >> 1), -(c.getHeight() >> 1) );
      c.setLocation( p2 );
    }
  }
 
//  public void setUndecorated( boolean b )
View Full Code Here

                                imageOffset, transferable, this);
                }
                else {
                    if (dragIcon != null) {
                        Point screen = dragSource.getLocationOnScreen();
                        screen.translate(origin.x, origin.y);
                        Point cursorOffset = new Point(-imageOffset.x, -imageOffset.y);
                        ghost = new GhostedDragImage(dragSource, dragIcon,
                                                     getImageLocation(screen), cursorOffset);
                        ghost.setAlpha(ghostAlpha);
                    }
View Full Code Here

       
        Point pmin = new Point();
        Point pmax = new Point(cnvsSize.width, cnvsSize.height);
        if(ruler.isVisible()){
            pmin.translate(Ruler.RULER_WIDTH, 0);
            pmax.translate(0, -Ruler.RULER_WIDTH);
        }
       
        // update legend and subtract legend space from plot space
        if(plot.hasLegend()){
            legendBounds = plot.getLegendBounds();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.