Package gov.nasa.arc.mct.gui

Examples of gov.nasa.arc.mct.gui.NamingContext


      @Override
      public void setCanvasContextTitleList(List<String> s) { if(!s.isEmpty()) naming = s.get(0); }
      public void setPanelContextTitleList(List<String> s) { if(!s.isEmpty()) naming = s.get(0); }
    });
   
    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");
   
    manifestation.setNamingContext(nullContext);
    manifestation.updateMonitoredGUI(event);
    Assert.assertEquals(naming, "");
   
View Full Code Here


 
 
  @Override
  public void paint(Graphics g) {
    boolean hasTitle = true;
    NamingContext nc = getNamingContext();
    if (nc != null && nc.getContextualName() == null) hasTitle = false;
   
    /* Only paint background if we are on a panel or similar */
    if (hasTitle) super.paint(g);
     
    /* Pad for border, or other stuff */
 
View Full Code Here

    Shape shape = (Shape) view.getSettings().getSetting(GraphicalSettings.GRAPHICAL_SHAPE);
    List<Brush> brushList = view.getSettings().getLayers();
   
    view.setSize(SIZE, SIZE);       
    view.setBackground(BACKGROUND);
    view.setNamingContext(new NamingContext() {
      @Override
      public NamingContext getParentContext() {
        return null;
      }
      @Override
View Full Code Here

    f.set(manifestation, new AbbreviatingTableLabelingAlgorithm() {
      @Override
      public void setContextLabels(String... s) { naming = s[0]; }
    });
   
    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");
   
    manifestation.setNamingContext(nullContext);
    manifestation.updateMonitoredGUI(event);
    Assert.assertEquals(naming, "");
   
View Full Code Here

TOP

Related Classes of gov.nasa.arc.mct.gui.NamingContext

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.