示例#1
0
 // box is only visible when it has at least one visible item
 @Override
 protected void handleFieldVisibilityChanged() {
   super.handleFieldVisibilityChanged();
   if (isInitialized()) {
     rebuildFieldGrid();
   }
 }
示例#2
0
  @Override
  protected void initConfig() {
    m_uiFacade = new P_UIFacade();
    Class<? extends IGroupBoxBodyGrid> bodyGridClazz = getConfiguredBodyGrid();
    if (bodyGridClazz != null) {
      IGroupBoxBodyGrid bodyGrid;
      try {
        bodyGrid = bodyGridClazz.newInstance();
        setBodyGrid(bodyGrid);
      } catch (Exception e) {
        SERVICES
            .getService(IExceptionHandlerService.class)
            .handleException(
                new ProcessingException(
                    "error creating instance of class '" + bodyGridClazz.getName() + "'.", e));
      }
    }
    m_customProcessButtonGrid = new GroupBoxProcessButtonGrid(this, true, false);
    m_systemProcessButtonGrid = new GroupBoxProcessButtonGrid(this, false, true);
    super.initConfig();
    categorizeFields();

    setExpandable(getConfiguredExpandable());
    setExpanded(getConfiguredExpanded());
    setBorderVisible(getConfiguredBorderVisible());
    setBorderDecoration(getConfiguredBorderDecoration());
    setGridColumnCountHint(getConfiguredGridColumnCount());
    setBackgroundImageName(getConfiguredBackgroundImageName());
    setBackgroundImageHorizontalAlignment(getConfiguredBackgroundImageHorizontalAlignment());
    setBackgroundImageVerticalAlignment(getConfiguredBackgroundImageVerticalAlignment());
    setScrollable(getConfiguredScrollable());
  }
示例#3
0
 // box is only visible when it has at least one visible item
 @Override
 protected void handleFieldVisibilityChanged() {
   super.handleFieldVisibilityChanged();
   if (isInitialized()) {
     rebuildFieldGrid();
   }
   IGroupBox selectedBox = getSelectedTab();
   if (selectedBox == null) {
     for (IGroupBox box : getGroupBoxes()) {
       if (box.isVisible()) {
         setSelectedTab(box);
         break;
       }
     }
   } else if (!selectedBox.isVisible()) {
     int index = getFieldIndex(selectedBox);
     IGroupBox[] boxes = getGroupBoxes();
     // next to right side
     for (int i = index + 1; i < getFieldCount(); i++) {
       if (boxes[i].isVisible()) {
         setSelectedTab(boxes[i]);
         break;
       }
     }
     if (getSelectedTab() == selectedBox) {
       // next to left side
       for (int i = index - 1; i >= 0; i--) {
         if (boxes[i].isVisible()) {
           setSelectedTab(boxes[i]);
           break;
         }
       }
     }
   }
 }
示例#4
0
 @Override
 protected void initConfig() {
   m_uiFacade = new P_UIFacade();
   m_grid = new TabBoxGrid(this);
   setMarkStrategy(getConfiguredMarkStrategy());
   super.initConfig();
   addPropertyChangeListener(
       PROP_SELECTED_TAB,
       new PropertyChangeListener() {
         @Override
         public void propertyChange(PropertyChangeEvent e) {
           // single observer exec
           try {
             execTabSelected(getSelectedTab());
           } catch (ProcessingException ex) {
             SERVICES.getService(IExceptionHandlerService.class).handleException(ex);
           } catch (Throwable t) {
             SERVICES
                 .getService(IExceptionHandlerService.class)
                 .handleException(new ProcessingException("Unexpected", t));
           }
         }
       });
 }
示例#5
0
 @Override
 public void removeField(IFormField f) {
   super.removeField(f);
   clearCategorization();
 }
示例#6
0
 @Override
 public void addField(IFormField f) {
   super.addField(f);
   clearCategorization();
 }