[elvystrac] r1840 - dokonceni tabu a vykonu ... stale nejde spustit z webu, problem se zobrazovanim dialogu

  • From: elvys@xxxxxxxxxxxxxxxxxxxxxx
  • To: elvystrac@xxxxxxxxxxxxx
  • Date: Wed, 24 Feb 2010 02:45:50 +0100

Author: EvaV
Date: 2010-02-24 02:45:49 +0100 (Wed, 24 Feb 2010)
New Revision: 1840

Modified:
   
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/DesignArea.java
   
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/LayoutDesigner.java
   
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/MenuBar.java
   
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/PopupMenu.java
   
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/TabbedPane.java
   
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/ToolBar.java
   
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/dialog/ResolutionChoiceDialog.java
   
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/propertiesManager/PropertiesManagerTabCloseButton.java
   
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/serverCommunication/ReadLayoutFromServer.java
   
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/serverCommunication/ServerSideContext.java
   trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/structures/Layout.java
   
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/structures/MovingObject.java
   
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/structures/Position.java
   
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/structures/ScreenResolution.java
Log:
dokonceni tabu a vykonu ... stale nejde spustit z webu, problem se zobrazovanim 
dialogu

Modified: 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/DesignArea.java
===================================================================
--- 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/DesignArea.java
   2010-02-23 22:19:45 UTC (rev 1839)
+++ 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/DesignArea.java
   2010-02-24 01:45:49 UTC (rev 1840)
@@ -152,10 +152,8 @@
         */
        private final static int TABBED_PANE_X_BORDER = 5;
        /** size of x border of tabbed pane */
-       private final static int TABBED_PANE_Y_BORDER = 32;
+       private final static int TABBED_PANE_Y_BORDER = 50;
        /** size of y border of tabbed pane */
-       private final static int TAB_CAT_PANEL_WIDTH_ELVYS = 200;
-       /** width of panel with tabs and categories */
 
 
 
@@ -340,7 +338,7 @@
                if (elvysHeight == 0) {
                        return elvysY;
                }
-
+               System.out.println(elvysY+ " " + monitorHeight + " " + 
elvysHeight);
                return (int) Math
                                .ceil((double)elvysY / (double)elvysHeight * 
(double)monitorHeight);
 
@@ -509,6 +507,8 @@
                        }
                        layout.moveOrResizePositionsWithKeyboard(designArea, 
deltaTopX,
                                        deltaTopY, deltaWidth, deltaHeight, 
addType);
+                       designArea.paintAllPositions();
+                       tabbedPane.getPropertiesManager().actualizeAll();
 
                }
 
@@ -614,6 +614,11 @@
 
                        object = newPosition.paint(designArea); 
                        objects.add(object);
+                       tabbedPane.getPropertiesManager().actualizeAll();
+                       
+                       //if(designArea.getObjects() != null && 
designArea.getObjects().getObject(newPosition.getId()) != null) {
+                       //      
designArea.getObjects().getObject(newPosition.getId()).setPosition(newPosition);
+                       //}
                }
                // isn't in design mode
                else {
@@ -726,13 +731,17 @@
 
                        setNotDesigning(true);
 
+                       
                        //designArea.remove(objects.getObject(id));
                        //newPosition.paint(designArea);
                        
-                       if(objects.getObject(id) != null ) {
-                               
objects.getObject(id).setLocation(newPosition.getMonitor().getTopX(), 
newPosition.getMonitor().getTopY());
-                               
objects.getObject(id).setSize(newPosition.getMonitor().getWidth(), 
newPosition.getMonitor().getHeight());
-                       }
+                       //if(objects.getObject(newPosition.getId()) != null ) {
+                       //      
objects.getObject(newPosition.getId()).setLocation(newPosition.getMonitor().getTopX(),
 newPosition.getMonitor().getTopY());
+                       //      
objects.getObject(newPosition.getId()).setSize(newPosition.getMonitor().getWidth(),
 newPosition.getMonitor().getHeight());
+                       //}
+                       designArea.paintAllPositions();
+                       
+                       tabbedPane.getPropertiesManager().actualizeAll();
 
                }
                // isn't in design mode
@@ -844,11 +853,13 @@
                        layout.addPosition(layout.getLayoutPositions(), 
newPosition,
                                        oldPosition, designArea, 
Layout.AddType.DESIGN, false);
 
-                       
objects.getObject(id).setLocation(newPosition.getMonitor().getTopX(), 
newPosition.getMonitor().getTopY());
-                       
objects.getObject(id).setSize(newPosition.getMonitor().getWidth(), 
newPosition.getMonitor().getHeight());
-
+                       
//objects.getObject(id).setLocation(newPosition.getMonitor().getTopX(), 
newPosition.getMonitor().getTopY());
+                       
//objects.getObject(id).setSize(newPosition.getMonitor().getWidth(), 
newPosition.getMonitor().getHeight());
+                       
//objects.getObject(id).writeDocumentIDandPermittedTypesOfDocuments();
+                       //objects.getObject(id).setPosition(newPosition);
                        
-                       //designArea.remove(objects.getObject(id));
+                       tabbedPane.getPropertiesManager().actualizeAll();
+                       designArea.paintAllPositions();
                        //newPosition.paint(designArea);
                }
 
@@ -858,6 +869,8 @@
                        monitorActualY = e.getY();
 
                        changeCoordinatesAndProperties();
+                       
+                       designArea.repaint();
                        designArea.resizeDesignArea(e.getX(), e.getY(),
                                        lastCorDesignAreaWidth, 
lastCorDesignAreaHeight);
                }
@@ -1007,6 +1020,8 @@
                        tab.getBottomCatPanel().setSize(designArea.getWidth(), 
bottomHeight);
                        tab.getDesignArea().setLocation(leftWidth, 0);
                        tab.getDesignArea().setSize(designArea.getWidth(), 
designArea.getHeight());
+                       
+                       designArea.paintAllPositions();
 
                }
        }
@@ -1094,6 +1109,7 @@
                for(int i = 0; i < objects.size(); ++i) {
                        objects.get(i).setBorder();
                }
+               designArea.repaint();
        }
        
        /**
@@ -1101,7 +1117,8 @@
         */
        public void setLabels() {
        
-               MovingObjects newObjects = new MovingObjects();
+               designArea.paintAllPositions();
+               /*MovingObjects newObjects = new MovingObjects();
                for(int i = 0; i < objects.size(); ++i) {
                        
                        if(objects.get(i).getPosition().isSelected()) {
@@ -1114,6 +1131,7 @@
                        
                }
                objects = newObjects;
+               designArea.repaint();*/
        }
 
        /**
@@ -1123,17 +1141,20 @@
        public void paintAllPositions() {
                // paints positions
                
-                       designArea.removeAll();
-
+               designArea.removeAll();
+               
+               
                        Vector<Position> positions = layout.getLayoutPositions()
                                        .getPositions();
 
+                       
+                       
                        objects = new MovingObjects();
                        for (int i = 0; i < positions.size(); ++i) {
                                Position actualPosition = positions.get(i);
                                objects.add(actualPosition.paint(designArea));
                        }
-               
+                       designArea.repaint();
        }
 
        /**
@@ -1449,55 +1470,5 @@
        public MovingObjects getObjects() {
                return objects;
        }
-       
-       /**
-        * Gets width of panel with tabs and categories on elvys
-        * @return the tabCatPanelWidth
-        */
-       public static int getTabCatPanelWidthElvys() {
-               return TAB_CAT_PANEL_WIDTH_ELVYS;
-       }
-       
-       /**
-        * Gets width of panel with tabs and categories on left side on monitor
-        * @return the tabCatPanelWidth
-        */
-       public int getLeftPanelWidthMonitor() {
-               
-               if (layout == null) {
-                       return TAB_CAT_PANEL_WIDTH_ELVYS;
-               }
 
-               int monitorWidth = 
layout.getScreenResolution().getMonitorWidth();
-               int elvysWidth = layout.getScreenResolution().getElvysWidth();
-
-               if (elvysWidth == 0) {
-                       return TAB_CAT_PANEL_WIDTH_ELVYS;
-               }
-
-               return (int) Math
-                               .round((double) (TAB_CAT_PANEL_WIDTH_ELVYS * 
monitorWidth / elvysWidth));
-       }
-       
-       /**
-        * Gets width of panel with tabs and categories on down side on monitor
-        * @return the tabCatPanelWidth
-        */
-       public int getDownPanelWidthMonitor() {
-               if (layout == null) {
-                       return TAB_CAT_PANEL_WIDTH_ELVYS;
-               }
-
-               int monitorHeight = 
layout.getScreenResolution().getMonitorHeight();
-               int elvysHeight = layout.getScreenResolution().getElvysHeight();
-
-               if (elvysHeight == 0) {
-                       return TAB_CAT_PANEL_WIDTH_ELVYS;
-               }
-
-               return (int) Math
-                               .round((double) TAB_CAT_PANEL_WIDTH_ELVYS * 
monitorHeight / elvysHeight);
-
-       }
-
 }
\ No newline at end of file

Modified: 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/LayoutDesigner.java
===================================================================
--- 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/LayoutDesigner.java
       2010-02-23 22:19:45 UTC (rev 1839)
+++ 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/LayoutDesigner.java
       2010-02-24 01:45:49 UTC (rev 1840)
@@ -344,16 +344,19 @@
         */
        public void openNewLayout() {
 
+               System.out.println("show dialog");
                ResolutionChoiceDialog resolutionChoiceDialog = new 
ResolutionChoiceDialog(
-                               new JDialog(), properties,
+                               new JFrame(), properties,
                                tabbedPane.getSupportedResolutions(), rootPane);
                ScreenResolution screenSizes = resolutionChoiceDialog
                                
.showResolutionChoiceDialog(TAB_PANEL_SIZE_WIDTH, CATEGORIES_PANEL_HEIGHT);
+               
 
                if (screenSizes == null) {
                        closeLayoutDesignerBrowserWindow();
                        return;
                }
+               
                String newDesignAreaName = 
tabbedPane.getProperties().getProperty(
                                "newDesignArea.label");
 

Modified: 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/MenuBar.java
===================================================================
--- 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/MenuBar.java  
    2010-02-23 22:19:45 UTC (rev 1839)
+++ 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/MenuBar.java  
    2010-02-24 01:45:49 UTC (rev 1840)
@@ -236,7 +236,7 @@
 
                // shows new resolution choice dialog and sets new resolution
                ResolutionChoiceDialog resolutionChoiceDialog = new 
ResolutionChoiceDialog(
-                               new JDialog(), properties, 
tabbedPane.getSupportedResolutions(), rootPane);
+                               new JFrame(), properties, 
tabbedPane.getSupportedResolutions(), rootPane);
                ScreenResolution newResolution = resolutionChoiceDialog
                                
.showResolutionChoiceDialog(tabbedPane.getLayoutDesigner().getTabPanelSizeWidth(),
 tabbedPane.getLayoutDesigner().getCategoriesPanelHeight());
 

Modified: 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/PopupMenu.java
===================================================================
--- 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/PopupMenu.java
    2010-02-23 22:19:45 UTC (rev 1839)
+++ 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/PopupMenu.java
    2010-02-24 01:45:49 UTC (rev 1840)
@@ -257,6 +257,7 @@
                        }
                        
                        
+                       designArea.paintAllPositions();
                        
                        designArea.requestFocusInWindow();
 

Modified: 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/TabbedPane.java
===================================================================
--- 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/TabbedPane.java
   2010-02-23 22:19:45 UTC (rev 1839)
+++ 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/TabbedPane.java
   2010-02-24 01:45:49 UTC (rev 1840)
@@ -282,6 +282,8 @@
                
                String notSavedFileName = layout.getNotSavedName();
                setTitleAt(getSelectedIndex(), notSavedFileName);
+               TabbedPaneCloseTabButton buttonTab = (TabbedPaneCloseTabButton) 
getTabComponentAt(0);
+               buttonTab.setNewTabTitle(notSavedFileName);
        }
 
        // getters & setters

Modified: 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/ToolBar.java
===================================================================
--- 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/ToolBar.java  
    2010-02-23 22:19:45 UTC (rev 1839)
+++ 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/components/ToolBar.java  
    2010-02-24 01:45:49 UTC (rev 1840)
@@ -14,6 +14,7 @@
 import javax.swing.JTabbedPane;
 import javax.swing.JToolBar;
 
+import com.elvys.applet.components.TabbedPane.Tab;
 import com.elvys.applet.structures.ActionsMemory;
 import com.elvys.applet.structures.Layout;
 import com.elvys.applet.structures.Positions;
@@ -338,7 +339,20 @@
                                Positions positions = 
layout.getLayoutPositions();
                                positions.changeMonitorResolution(designArea, 
screenSizes,
                                                newScreenSizes);
+                               
+                               Tab tab = tabbedPane.getActualTab();
+                               
+                               int leftWidth = 
designArea.getMonitorX(tabbedPane.getLayoutDesigner().getTabPanelSizeWidth());
+                               int bottomHeight = 
designArea.getMonitorY(tabbedPane.getLayoutDesigner().getCategoriesPanelHeight());
+                               
 
+                               tab.getLeftTabPanel().setSize(leftWidth, 
designArea.getHeight());
+                               
+                               tab.getBottomCatPanel().setLocation(leftWidth, 
designArea.getHeight());
+                               
tab.getBottomCatPanel().setSize(designArea.getWidth(), bottomHeight);
+                               tab.getDesignArea().setLocation(leftWidth, 0);
+                               
tab.getDesignArea().setSize(designArea.getWidth(), designArea.getHeight());
+
                        }
                });
 

Modified: 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/dialog/ResolutionChoiceDialog.java
===================================================================
--- 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/dialog/ResolutionChoiceDialog.java
   2010-02-23 22:19:45 UTC (rev 1839)
+++ 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/dialog/ResolutionChoiceDialog.java
   2010-02-24 01:45:49 UTC (rev 1840)
@@ -15,6 +15,7 @@
 import javax.swing.DefaultComboBoxModel;
 import javax.swing.JComboBox;
 import javax.swing.JDialog;
+import javax.swing.JFrame;
 import javax.swing.JOptionPane;
 import javax.swing.JRootPane;
 
@@ -91,10 +92,6 @@
                        }
                }
                
-               if(resolutionList.isEmpty()) {
-                       resolutionList.add(new ResolutionListItem("16x9: 
1600x900", 1600, 900));
-                       resolutionList.add(new ResolutionListItem("12x9: 
1200x900", 1200, 900));
-               }
                return resolutionList;
        }
        
@@ -106,8 +103,10 @@
         */
        public ScreenResolution showResolutionChoiceDialog(int elvysX, int 
elvysY) {
                
-               dialog.pack();
-               dialog.setLocationRelativeTo(rootPane);
+               System.out.println("show resolution dialog");
+               //dialog.pack();
+               //dialog.setVisible(true);
+               //dialog.setLocationRelativeTo(rootPane);
                resolutionChoiceDialog.pack();
                resolutionChoiceDialog.setLocationRelativeTo(rootPane);
                resolutionChoiceDialog.setVisible(true);
@@ -116,6 +115,12 @@
                        return null;
                }
 
+               if(resolutionChoiceDialog
+                               .getKioskWidth() == 0 || resolutionChoiceDialog
+                               .getKioskHeight() == 0) {
+                       return null;
+               }
+               
                return new ScreenResolution(resolutionChoiceDialog
                                .getKioskWidth() - elvysX, 
resolutionChoiceDialog.getKioskHeight() - elvysY);
 
@@ -123,18 +128,19 @@
 
        /**
         * Constructor of the class ResolutionChoiceDialog. Initializes 
ResolutionChoiceDialog components.
-        * @param dialog parent dialog to set
+        * @param frame parent frame
         * @param properties properties to set
         * @param supportedResolution supported resolutions to set
         */
-       public ResolutionChoiceDialog(JDialog dialog, Properties properties,
+       public ResolutionChoiceDialog(JFrame frame, Properties properties,
                        SupportedResolutions supportedResolution, JRootPane 
rootPane) {
-               super(dialog, 
properties.getProperty("dialog.resolutionChoice"), true);
+               super(frame, properties.getProperty("dialog.resolutionChoice"), 
true);
                this.resolutionChoiceDialog = this;
                this.supportedResolutions = supportedResolution;
-               this.dialog = dialog;
+               //this.dialog = dialog;
                this.rootPane = rootPane;
                
+               System.out.println("create dialog");
 
                // create an array of the components to be displayed
                resolutionList = new JComboBox();

Modified: 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/propertiesManager/PropertiesManagerTabCloseButton.java
===================================================================
--- 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/propertiesManager/PropertiesManagerTabCloseButton.java
       2010-02-23 22:19:45 UTC (rev 1839)
+++ 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/propertiesManager/PropertiesManagerTabCloseButton.java
       2010-02-24 01:45:49 UTC (rev 1840)
@@ -89,6 +89,7 @@
                        propertiesManagerTabbedPane.setVisible(false);
                        
layoutsTabbedPane.getToolBar().getPropertiesManagerButton().setVisible(true);
 
+                       
                }
 
                /**

Modified: 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/serverCommunication/ReadLayoutFromServer.java
===================================================================
--- 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/serverCommunication/ReadLayoutFromServer.java
        2010-02-23 22:19:45 UTC (rev 1839)
+++ 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/serverCommunication/ReadLayoutFromServer.java
        2010-02-24 01:45:49 UTC (rev 1840)
@@ -128,7 +128,7 @@
 
                                        SupportedResolutions resolutions = 
supportedAspectRatios.getResolutionsWithAspectRatio(layoutAspectRatio);
                                        ResolutionChoiceDialog 
resolutionChoiceDialog = new ResolutionChoiceDialog(
-                                                       new JDialog(), 
tabbedPane.getProperties(),
+                                                       new JFrame(), 
tabbedPane.getProperties(),
                                                        resolutions, 
tabbedPane.getRootPane());
                                        
                                        if(resolutions == null) {

Modified: 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/serverCommunication/ServerSideContext.java
===================================================================
--- 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/serverCommunication/ServerSideContext.java
   2010-02-23 22:19:45 UTC (rev 1839)
+++ 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/serverCommunication/ServerSideContext.java
   2010-02-24 01:45:49 UTC (rev 1840)
@@ -320,6 +320,13 @@
                                        ratios.add(supportedResolution);
                                }
                        }
+                       for(int i = 0; i < ratios.size(); ++i) {
+                               
System.out.println(ratios.get(i).getAspectRatio());
+                               for(int j = 0; j < 
ratios.get(i).getResolutions().size(); ++j) {
+                                       System.out.println( 
ratios.get(i).getResolutions().get(j).getElvysWidth());
+                                       System.out.println( 
ratios.get(i).getResolutions().get(j).getElvysHeight());
+                               }
+                       }
                        return ratios;
                }
        }

Modified: 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/structures/Layout.java
===================================================================
--- 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/structures/Layout.java   
    2010-02-23 22:19:45 UTC (rev 1839)
+++ 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/structures/Layout.java   
    2010-02-24 01:45:49 UTC (rev 1840)
@@ -593,6 +593,9 @@
                        boolean isDesignedCorrectly = 
position.toNoOverlap(addType,
                                        noOverlapPosition);
                        if (!isDesignedCorrectly) {
+                               //if(designArea.getObjects() != null && 
designArea.getObjects().getObject(position.getId()) != null) {
+                               //      
designArea.getObjects().getObject(position.getId()).setPosition(position);
+                               //}
                                return;
                        }
                }
@@ -601,6 +604,9 @@
                        boolean isDesignedCorrectly = 
position.toNoOverlap(addType,
                                        noOverlapPosition);
                        if (!isDesignedCorrectly) {
+                               //if(designArea.getObjects() != null && 
designArea.getObjects().getObject(position.getId()) != null) {
+                               //      
designArea.getObjects().getObject(position.getId()).setPosition(position);
+                               //}
                                return;
                        }
                }
@@ -612,6 +618,9 @@
                if (!isTooSmall) {
 
                        positions.addPosition(position);
+                       //if(designArea.getObjects() != null && 
designArea.getObjects().getObject(position.getId()) != null) {
+                       //      
designArea.getObjects().getObject(position.getId()).setPosition(position);
+                       //}
 
                        // while editing layout position count was changed
                        if (isFinalPosition && !isNew && addType != 
Layout.AddType.MOVE
@@ -627,7 +636,7 @@
                        }
                        
 
-                       
designArea.getObjects().getObject(position.getId()).setPosition(position);
+                       
 
                        if (designArea.isSaved()) {
                                TabbedPane tabbedPane = 
designArea.getTabbedPane();
@@ -637,8 +646,6 @@
                        }
 
                }
-
-               //designArea.paintAllPositions();
        }
 
        /**
@@ -724,6 +731,9 @@
 
                }
                setLayoutPositions(layoutPositions);
+
+               designArea.paintAllPositions();
+               
designArea.getTabbedPane().getPropertiesManager().actualizeAll();
                
designArea.getActionMemory().addActionToActionsMemory(designArea);
 
        }
@@ -760,6 +770,9 @@
 
                }
                setLayoutPositions(layoutPositions);
+
+               designArea.paintAllPositions();
+               
designArea.getTabbedPane().getPropertiesManager().actualizeAll();
                
designArea.getActionMemory().addActionToActionsMemory(designArea);
 
        }
@@ -795,6 +808,9 @@
 
                }
                setLayoutPositions(layoutPositions);
+
+               designArea.paintAllPositions();
+               
designArea.getTabbedPane().getPropertiesManager().actualizeAll();
                
designArea.getActionMemory().addActionToActionsMemory(designArea);
        }
 
@@ -831,6 +847,9 @@
 
                }
                setLayoutPositions(layoutPositions);
+
+               designArea.paintAllPositions();
+               
designArea.getTabbedPane().getPropertiesManager().actualizeAll();
                
designArea.getActionMemory().addActionToActionsMemory(designArea);
        }
 
@@ -925,6 +944,7 @@
                        setLayoutPositions(positions);
                        designArea.setMyLayout(layout);
                        designArea.paintAllPositions();
+                       
designArea.getTabbedPane().getPropertiesManager().actualizeAll();
                        
designArea.getActionMemory().addActionToActionsMemory(designArea);
                }
 
@@ -1014,8 +1034,8 @@
                if (!selectedPositions.isOverlap()) {
                        layout.setLayoutPositions(positions);
                        designArea.setMyLayout(layout);
-
                        designArea.paintAllPositions();
+                       
designArea.getTabbedPane().getPropertiesManager().actualizeAll();
                        
designArea.getActionMemory().addActionToActionsMemory(designArea);
                }
 

Modified: 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/structures/MovingObject.java
===================================================================
--- 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/structures/MovingObject.java
 2010-02-23 22:19:45 UTC (rev 1839)
+++ 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/structures/MovingObject.java
 2010-02-24 01:45:49 UTC (rev 1840)
@@ -209,11 +209,12 @@
                                + "</align></p></html>";
                
 
-               System.out.println(labelName);
                
-               if(label == null ) {
+               
+               
+               if(label == null) {
                        label = new Label(labelName);
-                       instance.add(label);
+                       add(label);
                
                        Font font = new Font("NewRoman", Font.PLAIN, 10);
                        label.setFont(font);
@@ -525,7 +526,7 @@
                designArea.getMyLayout().setLayoutPositions(newPositions);
                designArea.getTabbedPane().getPropertiesManager()
                                .actualizePropertiesTable();
-               designArea.paintAllPositions();
+               //designArea.paintAllPositions();
 
        }
 
@@ -792,7 +793,7 @@
                                                .actualizeAll();
                                designArea.requestFocusInWindow();
 
-                               designArea.removeAll();
+                               /*designArea.removeAll();
 
                                Vector<Position> positions = 
layout.getLayoutPositions()
                                                .getPositions();
@@ -808,7 +809,7 @@
                                                designArea.getObjects().add(
                                                                
actualPosition.paint(designArea));
                                        }
-                               }
+                               }*/
 
                                designArea.setIsNotMoving(false);
 
@@ -840,6 +841,7 @@
                        @Override
                        public void mouseReleased(MouseEvent e) {
 
+                               
                                designArea.setIsNotMoving(true);
                                designArea.setNotDesigning(true);
 
@@ -883,7 +885,7 @@
                                                                designArea);
                                                
designArea.getTabbedPane().getPropertiesManager()
                                                                .actualizeAll();
-                                               position = newPosition;
+                                               designArea.paintAllPositions();
 
                                        } else {
                                                if 
(designArea.getMyLayout().getLayoutPositions()
@@ -904,7 +906,7 @@
                addMouseMotionListener(new MouseAdapter() {
                        @Override
                        public void mouseDragged(MouseEvent e) {
-
+                               
                                designArea.requestFocusInWindow();
 
                                int topX = position.getElvys().getTopX()

Modified: 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/structures/Position.java
===================================================================
--- 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/structures/Position.java 
    2010-02-23 22:19:45 UTC (rev 1839)
+++ 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/structures/Position.java 
    2010-02-24 01:45:49 UTC (rev 1840)
@@ -193,6 +193,9 @@
                                                                                
                                                                // others
                                                                                
                                                                // positions
                                newPositions.addPosition(position);
+                               if(designArea.getObjects() != null && 
designArea.getObjects().getObject(position.getId()) != null) {
+                                       
designArea.getObjects().getObject(position.getId()).setPosition(position);
+                               }
 
                        }
                } else {
@@ -200,6 +203,9 @@
                                Position position = 
layout.getLayoutPositions().get(i).clone();
                                if (position.getId() == id) {
                                        position.setSelected(true);
+                                       if(designArea.getObjects() != null && 
designArea.getObjects().getObject(position.getId()) != null) {
+                                               
designArea.getObjects().getObject(position.getId()).setPosition(position);
+                                       }
                                }
                                newPositions.addPosition(position);
                        }
@@ -208,6 +214,7 @@
                layout.setLayoutPositions(newPositions);
 
                
designArea.getTabbedPane().getPropertiesManager().actualizeAll();
+               
designArea.getTabbedPane().getToolBar().setEnabledForCenterAndAlignButtons(true);
                designArea.selectPositions();
 
        }
@@ -1409,6 +1416,7 @@
         */
        public MovingObject paint(DesignArea designArea, MovingObject object) {
 
+               
                AbsoluteCoordinates absol = getMonitor();
 
                object.setLocation(absol.getTopX(), absol.getTopY());
@@ -1419,7 +1427,7 @@
                object.setBorder();
                object.writeDocumentIDandPermittedTypesOfDocuments();
 
-               // object.setOpaque(false);
+               //object.setOpaque(false);
                Color lightBlue = new Color(184, 207, 229);
                object.setBackground(lightBlue);
                designArea.add(object);
@@ -1446,7 +1454,7 @@
                object.setBorder();
                object.writeDocumentIDandPermittedTypesOfDocuments();
 
-               // object.setOpaque(false);
+               //object.setOpaque(false);
                Color lightBlue = new Color(184, 207, 229);
                object.setBackground(lightBlue);
                designArea.add(object);

Modified: 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/structures/ScreenResolution.java
===================================================================
--- 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/structures/ScreenResolution.java
     2010-02-23 22:19:45 UTC (rev 1839)
+++ 
trunk/layouteditor/LayoutDesigner/src/com/elvys/applet/structures/ScreenResolution.java
     2010-02-24 01:45:49 UTC (rev 1840)
@@ -118,7 +118,7 @@
        
        /**
         * Sets resolution of the monitor according to the resolution of the 
elvys.
-        * If elvysWidth is greater then elvysHeight, sets monitorWidth to the 
@MAX_SIZE and computes monitorHeight according to the elvys' aspect ratio   
+        * If elvysWidth is greater then elvysHeight, sets monitorWidth to the 
MAX_SIZE and computes monitorHeight according to the elvys' aspect ratio   
         */
        private void setMonitorFromElvys() {
        


Other related posts:

  • » [elvystrac] r1840 - dokonceni tabu a vykonu ... stale nejde spustit z webu, problem se zobrazovanim dialogu - elvys