Package gov.nasa.arc.mct.roles.events

Examples of gov.nasa.arc.mct.roles.events.PropertyChangeEvent


                    if(childNode.getUserObject() instanceof View) {
                        View man = (View) childNode.getUserObject();
                        if (man.getManifestedComponent().getId().equalsIgnoreCase(newComponentId)) {
                            // Found the child that corresponds to our new component. Set it as selected.
                            directoryArea.setSelectedNode(childNode);
                            PropertyChangeEvent pce = new PropertyChangeEvent(man.getManifestedComponent());
                            pce.setProperty(PropertyChangeEvent.DISPLAY_NAME, PropertyChangeEvent.DISPLAY_NAME);
                            man.updateMonitoredGUI(pce);
                            break;
                        }
                    }           
                }
View Full Code Here


    public void testUpdateMonitoredGUI_PropertyChange() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
        Field field = nodeViewManifestation.getClass().getDeclaredField("label");
        field.setAccessible(true);
        JLabel label = (JLabel) field.get(nodeViewManifestation);

        PropertyChangeEvent event = new PropertyChangeEvent(mockComponent);
        String fixedString = "YYY";
        event.setProperty(PropertyChangeEvent.DISPLAY_NAME, fixedString);
        Mockito.when(mockComponent.getExtendedDisplayName()).thenReturn(fixedString);

        MCTMutableTreeNode mockTreeNode = Mockito.mock(MCTMutableTreeNode.class);
        JTree mockTree = Mockito.mock(JTree.class);
        Mockito.when(mockTreeNode.getParentTree()).thenReturn(mockTree);
View Full Code Here

   
    NamingContext nullContext = Mockito.mock(NamingContext.class);
    NamingContext blankContext = Mockito.mock(NamingContext.class);
    NamingContext specificContext = Mockito.mock(NamingContext.class);
   
    PropertyChangeEvent event = Mockito.mock(PropertyChangeEvent.class);
   
    Mockito.when(nullContext.getContextualName()).thenReturn(null);
    Mockito.when(blankContext.getContextualName()).thenReturn("");
    Mockito.when(specificContext.getContextualName()).thenReturn("Specific");
   
View Full Code Here

     * Notifies view roles for the manifested component that the panel title
     * display has changed.
     */
    private void notifyTitleChanged() {
        AbstractComponent component = wrappedManifestation.getManifestedComponent();
        PropertyChangeEvent event = new PropertyChangeEvent(component);
        event.setProperty(PropertyChangeEvent.DISPLAY_NAME, component.getDisplayName());
        event.setProperty(PropertyChangeEvent.PANEL_TITLE, getTitle());
        // Avoids refreshing other manifestations when changing the panel title of
        // one manifestation.
        wrappedManifestation.updateMonitoredGUI(event);
    }
View Full Code Here

     * @param name
     *            the new display name
     */
    public void setAndUpdateDisplayName(String name) {
        this.setDisplayName(name);
        PropertyChangeEvent event = new PropertyChangeEvent(this);
        event.setProperty(PropertyChangeEvent.DISPLAY_NAME, this.displayName);
        firePropertyChangeEvent(event);
    }
View Full Code Here

     *
     * @param name the owner name
     */
    public void setAndUpdateOwner(String name) {
        this.setOwner(name);
        PropertyChangeEvent event = new PropertyChangeEvent(this);
        event.setProperty(PropertyChangeEvent.OWNER, this.owner);
        firePropertyChangeEvent(event);
    }
View Full Code Here

   
    NamingContext nullContext = Mockito.mock(NamingContext.class);
    NamingContext blankContext = Mockito.mock(NamingContext.class);
    NamingContext specificContext = Mockito.mock(NamingContext.class);
   
    PropertyChangeEvent event = Mockito.mock(PropertyChangeEvent.class);
   
    Mockito.when(nullContext.getContextualName()).thenReturn(null);
    Mockito.when(blankContext.getContextualName()).thenReturn("");
    Mockito.when(specificContext.getContextualName()).thenReturn("Specific");
   
View Full Code Here

TOP

Related Classes of gov.nasa.arc.mct.roles.events.PropertyChangeEvent

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.