Exemplo n.º 1
0
 @Override
 public void addLayoutComponent(java.awt.Component comp, Object constraints) {
   if (org.lgna.croquet.views.BorderPanel.Constraint.CENTER.getInternal().equals(constraints)) {
     this.mainComponent = comp;
   } else if (org.lgna.croquet.views.BorderPanel.Constraint.PAGE_END
       .getInternal()
       .equals(constraints)) {
     this.bottomComponent = comp;
   } else {
     assert false : constraints;
   }
 }
Exemplo n.º 2
0
 public void setTopView(org.lgna.croquet.views.SwingComponentView<?> top) {
   synchronized (this.getTreeLock()) {
     //			org.lgna.croquet.views.AwtComponentView<?> component =
     // this.mainPanel.getCenterComponent();
     //			if( component != null ) {
     //				this.mainPanel.removeComponent( component );
     //			}
     //			this.mainPanel.addCenterComponent( top );
     StickyLayout stickyLayout = this.getLayout();
     java.awt.Component awtComponent = stickyLayout.getMainComponent();
     if (awtComponent != null) {
       this.getAwtComponent().remove(awtComponent);
     }
     this.internalAddComponent(
         top, org.lgna.croquet.views.BorderPanel.Constraint.CENTER.getInternal());
   }
 }