// box is only visible when it has at least one visible item @Override protected void handleFieldVisibilityChanged() { super.handleFieldVisibilityChanged(); if (isInitialized()) { rebuildFieldGrid(); } }
@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()); }
// 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; } } } } }
@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)); } } }); }
@Override public void removeField(IFormField f) { super.removeField(f); clearCategorization(); }
@Override public void addField(IFormField f) { super.addField(f); clearCategorization(); }