Package nextapp.echo2.app.update

Examples of nextapp.echo2.app.update.PropertyUpdate


        colMain.add(label);
    }
   
    public void addBlankLine() {
        Row row = new Row();
        ColumnLayoutData layout = new ColumnLayoutData();
        layout.setHeight(new JbsExtent(15,JbsExtent.PX));
        row.setLayoutData(layout);
        colMain.add(row);
    }
View Full Code Here


                    break;
                default :
                    align = Alignment.LEFT;
            }
           
            TableLayoutData layoutData = (TableLayoutData)((Label)component).getLayoutData();
            layoutData.setAlignment(new Alignment(align, Alignment.CENTER));
            ((Label)component).setLayoutData(layoutData);
        }
        return component;
    }
View Full Code Here

     * Test storage/retrieval of application property update.
     */
    public void testApplicationPropertyUpdate() {
        manager.purge();
        columnApp.setFocusedComponent(columnApp.getLabel());
        PropertyUpdate propertyUpdate = manager.getServerUpdateManager().getApplicationPropertyUpdate(
                ApplicationInstance.FOCUSED_COMPONENT_CHANGED_PROPERTY);
        assertNotNull(propertyUpdate);
        assertNull(propertyUpdate.getOldValue());
        assertEquals(columnApp.getLabel(), propertyUpdate.getNewValue());
    }
View Full Code Here

                columnApp.getColumn());
        manager.processClientUpdates();
        assertEquals(columnApp.getColumn(), columnApp.getFocusedComponent());
       
        columnApp.setFocusedComponent(columnApp.getLabel());
        PropertyUpdate propertyUpdate = manager.getServerUpdateManager().getApplicationPropertyUpdate(
                ApplicationInstance.FOCUSED_COMPONENT_CHANGED_PROPERTY);
        assertNotNull(propertyUpdate);
        assertEquals(columnApp.getColumn(), propertyUpdate.getOldValue());
        assertEquals(columnApp.getLabel(), propertyUpdate.getNewValue());
    }
View Full Code Here

        manager.purge();
        manager.getClientUpdateManager().setApplicationProperty(ApplicationInstance.FOCUSED_COMPONENT_CHANGED_PROPERTY,
                columnApp.getLabel());
        manager.processClientUpdates();
        assertEquals(columnApp.getLabel(), columnApp.getFocusedComponent());
        PropertyUpdate propertyUpdate = manager.getServerUpdateManager().getApplicationPropertyUpdate(
                ApplicationInstance.FOCUSED_COMPONENT_CHANGED_PROPERTY);
        assertNull(propertyUpdate);
    }
View Full Code Here

        assertEquals(0, componentUpdates[0].getRemovedChildren().length);
       
        String[] updatedPropertyNames = componentUpdates[0].getUpdatedPropertyNames();
        assertEquals(1, updatedPropertyNames.length);
        assertEquals(Label.PROPERTY_TEXT, updatedPropertyNames[0]);
        PropertyUpdate propertyUpdate = componentUpdates[0].getUpdatedProperty(Label.PROPERTY_TEXT);
        assertEquals("Label", propertyUpdate.getOldValue());
        assertEquals("Hi there", propertyUpdate.getNewValue());
       
        // Remove label entirely and ensure property update disappears.
        columnApp.getColumn().remove(columnApp.getLabel());
        componentUpdates = manager.getServerUpdateManager().getComponentUpdates();
        assertEquals(1, componentUpdates.length);
View Full Code Here

        manager.getClientUpdateManager().setComponentProperty(textField, TextField.TEXT_CHANGED_PROPERTY, "a user typed this.");
        manager.processClientUpdates();
       
        ServerComponentUpdate[] componentUpdates = manager.getServerUpdateManager().getComponentUpdates();
        assertEquals(1, componentUpdates.length);
        PropertyUpdate backgroundUpdate =
                  componentUpdates[0].getUpdatedProperty(TextField.PROPERTY_BACKGROUND);
        assertNotNull(backgroundUpdate);
        assertEquals(Color.BLUE, backgroundUpdate.getNewValue());
        assertNull(componentUpdates[0].getUpdatedProperty(TextField.TEXT_CHANGED_PROPERTY));
    }
View Full Code Here

        Component focusedComponent = null;
        if (initial) {
            focusedComponent = applicationInstance.getFocusedComponent();
        } else {
            ServerUpdateManager serverUpdateManager = applicationInstance.getUpdateManager().getServerUpdateManager();
            PropertyUpdate focusUpdate =
                    serverUpdateManager.getApplicationPropertyUpdate(ApplicationInstance.FOCUSED_COMPONENT_CHANGED_PROPERTY);
            if (focusUpdate != null) {
                focusedComponent = (Component) focusUpdate.getNewValue();
            }
        }

        if (focusedComponent != null) {
            ComponentSynchronizePeer componentSyncPeer
View Full Code Here

        Element updateElement = rc.getServerMessage().appendPartDirective(ServerMessage.GROUP_ID_PREREMOVE,
                "EchoWindowPane.MessageProcessor", "update");
        String elementId = ContainerInstance.getElementId(windowPane);
        updateElement.setAttribute("eid", elementId);

        PropertyUpdate positionX = update.getUpdatedProperty(WindowPane.PROPERTY_POSITION_X);
        if (positionX != null) {
            renderPixelProperty(windowPane, WindowPane.PROPERTY_POSITION_X, updateElement, "position-x");
        }

        PropertyUpdate positionY = update.getUpdatedProperty(WindowPane.PROPERTY_POSITION_Y);
        if (positionY != null) {
            renderPixelProperty(windowPane, WindowPane.PROPERTY_POSITION_Y, updateElement, "position-y");
        }
       
        PropertyUpdate width = update.getUpdatedProperty(WindowPane.PROPERTY_WIDTH);
        if (width != null) {
            renderPixelProperty(windowPane, WindowPane.PROPERTY_WIDTH, updateElement, "width");
        }

        PropertyUpdate height = update.getUpdatedProperty(WindowPane.PROPERTY_HEIGHT);
        if (height != null) {
            renderPixelProperty(windowPane, WindowPane.PROPERTY_HEIGHT, updateElement, "height");
        }
       
        if (update.getUpdatedProperty(WindowPane.PROPERTY_TITLE) != null) {
View Full Code Here

        //If nor group is found then create a new one:
        if (newColumn == null) {
            newColumn = new Column();
            newColumn.setId(groupName);
            newColumn.setStyleName("Default");
            AccordionPaneLayoutData layoutData = new AccordionPaneLayoutData();
            layoutData.setTitle(groupTitle);
            newColumn.setLayoutData(layoutData);
            this.add(newColumn);
        }
        return newColumn;
    }
View Full Code Here

TOP

Related Classes of nextapp.echo2.app.update.PropertyUpdate

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.