Author: EvaV Date: 2010-02-25 11:08:35 +0100 (Thu, 25 Feb 2010) New Revision: 1865 Modified: trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/DesignArea.java trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/structures/MovingObject.java Log: oprava - vykreslovani nereaguje pri kliknuti pravym tlacitkem Modified: trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/DesignArea.java =================================================================== --- trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/DesignArea.java 2010-02-25 10:04:32 UTC (rev 1864) +++ trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/DesignArea.java 2010-02-25 10:08:35 UTC (rev 1865) @@ -150,7 +150,7 @@ * size of area in bottom right corner of design area where design area is * resizable */ - private final static int TABBED_PANE_X_BORDER = 5; + private final static int TABBED_PANE_X_BORDER = 10; /** size of x border of tabbed pane */ private final static int TABBED_PANE_Y_BORDER = 50; /** size of y border of tabbed pane */ @@ -693,6 +693,10 @@ if (e.isPopupTrigger()) { return; } + + if (e.getButton() != MouseEvent.BUTTON1) { + return; + } // is in design mode if (isInDesignMode) { @@ -800,6 +804,9 @@ return; } + if (e.getButton() != MouseEvent.BUTTON1) { + return; + } // is in design mode if (isInDesignMode) { Modified: trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/structures/MovingObject.java =================================================================== --- trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/structures/MovingObject.java 2010-02-25 10:04:32 UTC (rev 1864) +++ trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/structures/MovingObject.java 2010-02-25 10:08:35 UTC (rev 1865) @@ -7,6 +7,7 @@ import java.awt.Graphics2D; import java.awt.Insets; import java.awt.RenderingHints; +import java.awt.event.InputEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; @@ -761,6 +762,16 @@ @Override public void mousePressed(MouseEvent e) { + if (e.isPopupTrigger()) { + return; + } + + // wasn't pressed left mouse button + + if (e.getButton() != MouseEvent.BUTTON1) { + return; + } + // for selected position sets cursor if (position.isSelected()) { setCursor(e.getX(), e.getY()); @@ -841,7 +852,14 @@ @Override public void mouseReleased(MouseEvent e) { + if (e.isPopupTrigger()) { + return; + } + if (e.getButton() != MouseEvent.BUTTON1) { + return; + } + designArea.setIsNotMoving(true); designArea.setNotDesigning(true); @@ -899,6 +917,16 @@ } } } + monitorTopX = 0; + monitorTopY = 0; + monitorWidth = 0; + monitorHeight = 0; + monitorDx = 0; + monitorDy = 0; + monitorX1 = 0; + monitorX2 = 0; + monitorY1 = 0; + monitorY2 = 0; } }); @@ -907,6 +935,14 @@ @Override public void mouseDragged(MouseEvent e) { + if (e.isPopupTrigger()) { + return; + } + + if (e.getButton() != MouseEvent.BUTTON1) { + return; + } + designArea.requestFocusInWindow(); int topX = position.getElvys().getTopX()