/** * Gets the number of tabs present. * * @return the tab count */ public int getTabCount() { return panel.getWidgetCount() - 2; }
/** * Selects the tab corresponding to the widget for the tab. To be clear the * widget for the tab is not the widget INSIDE of the tab; it is the widget * used to represent the tab itself. * * @param tabWidget The widget for the tab to be selected * @return true if the tab corresponding to the widget for the tab could * located and selected, false otherwise */ private boolean selectTabByTabWidget(Widget tabWidget) { int numTabs = panel.getWidgetCount() - 1; for (int i = 1; i < numTabs; ++i) { if (panel.getWidget(i) == tabWidget) { return selectTab(i - 1); } } return false; }
/** * <b>Affected Elements:</b> * <ul> * <li>-# = the cell at the given index.</li> * </ul> * * @see UIObject#onEnsureDebugId(String) */ @Override protected void onEnsureDebugId(String baseID) { super.onEnsureDebugId(baseID); int numChildren = getWidgetCount(); for (int i = 0; i < numChildren; i++) { ensureDebugId(getWidgetTd(getWidget(i)), baseID, "" + i); } }
/** * Gets the number of tabs present. * * @return the tab count */ public int getTabCount() { return panel.getWidgetCount() - 2; }
/** * Gets the number of tabs present. * * @return the tab count */ public int getTabCount() { return panel.getWidgetCount() - 2; }
public boolean hasButtons() { return left.getWidgetCount() > 0 || right.getWidgetCount() > 0; }
/** * Selects the tab corresponding to the widget for the tab. To be clear the * widget for the tab is not the widget INSIDE of the tab; it is the widget * used to represent the tab itself. * * @param tabWidget The widget for the tab to be selected * @return true if the tab corresponding to the widget for the tab could * located and selected, false otherwise */ private boolean selectTabByTabWidget(Widget tabWidget) { int numTabs = panel.getWidgetCount() - 1; for (int i = 1; i < numTabs; ++i) { if (panel.getWidget(i) == tabWidget) { return selectTab(i - 1); } } return false; }
/** * Selects the tab corresponding to the widget for the tab. To be clear the * widget for the tab is not the widget INSIDE of the tab; it is the widget * used to represent the tab itself. * * @param tabWidget The widget for the tab to be selected * @return true if the tab corresponding to the widget for the tab could * located and selected, false otherwise */ private boolean selectTabByTabWidget(Widget tabWidget) { int numTabs = panel.getWidgetCount() - 1; for (int i = 1; i < numTabs; ++i) { if (panel.getWidget(i) == tabWidget) { return selectTab(i - 1); } } return false; }
@Override public void onMouseOver( MouseOverEvent event ) { add.setResource( HexaFramework.images.add() ); int nb = buttonBar.getWidgetCount(); for( int i = 0; i < nb; i++ ) { Widget w = buttonBar.getWidget( i ); if( w != add ) w.getElement().getStyle().clearDisplay(); } } } );
@Override public void onMouseOut( MouseOutEvent event ) { add.setResource( HexaFramework.images.ellipsis() ); int nb = buttonBar.getWidgetCount(); for( int i = 0; i < nb; i++ ) { Widget w = buttonBar.getWidget( i ); if( w != add ) w.getElement().getStyle().setDisplay( Display.NONE ); } } }, MouseOutEvent.getType() );
@Override public void onMouseOver( MouseOverEvent event ) { add.setResource( HexaFramework.images.add() ); int nb = buttonBar.getWidgetCount(); for( int i = 0; i < nb; i++ ) { Widget w = buttonBar.getWidget( i ); if( w != add ) w.getElement().getStyle().clearDisplay(); } } } );
@Override public void onMouseOut( MouseOutEvent event ) { add.setResource( HexaFramework.images.ellipsis() ); int nb = buttonBar.getWidgetCount(); for( int i = 0; i < nb; i++ ) { Widget w = buttonBar.getWidget( i ); if( w != add ) w.getElement().getStyle().setDisplay( Display.NONE ); } } }, MouseOutEvent.getType() );
public void setBusyIndicatorVisible(boolean visible) { pager.getButtonPanel().getWidget(pager.getButtonPanel().getWidgetCount() - 1).setVisible(visible); }
/** * <b>Affected Elements:</b> * <ul> * <li>-# = the cell at the given index.</li> * </ul> * * @see UIObject#onEnsureDebugId(String) */ @Override protected void onEnsureDebugId(String baseID) { super.onEnsureDebugId(baseID); int numChildren = getWidgetCount(); for (int i = 0; i < numChildren; i++) { ensureDebugId(getWidgetTd(getWidget(i)), baseID, "" + i); } }
/** * <b>Affected Elements:</b> * <ul> * <li>-# = the cell at the given index.</li> * </ul> * * @see UIObject#onEnsureDebugId(String) */ @Override protected void onEnsureDebugId(String baseID) { super.onEnsureDebugId(baseID); int numChildren = getWidgetCount(); for (int i = 0; i < numChildren; i++) { ensureDebugId(getWidgetTd(getWidget(i)), baseID, "" + i); } }
/** * Refresh the displayed drop-down */ public void refreshDropDownData() { if ( this.dropDownData == null ) { return; } if ( this.constraintWidget instanceof HorizontalPanel ) { HorizontalPanel hp = (HorizontalPanel) this.constraintWidget; for ( int iChildIndex = 0; iChildIndex < hp.getWidgetCount(); iChildIndex++ ) { Widget w = hp.getWidget( iChildIndex ); if ( w instanceof EnumDropDown ) { EnumDropDown edd = (EnumDropDown) w; edd.setDropDownData( constraint.getValue(), getDropDownData() ); } } } }
HorizontalPanel panel = new HorizontalPanel(); Widget w = new Widget(); //We add the one widget to the panel panel.add(w); //One more widget added w = new Widget(); panel.add(w); //Now we remove all the widgets from the panel for(int i = 0; i < panel.getWidgetCount(); i++){ panel.remove(panel.getWidget(i)); }
private void setFreezePanel(final boolean lockLHS, final boolean lockRHS) { HorizontalPanel hz = new HorizontalPanel(); if (!lockLHS) { hz.add(createFreezeButton(GuidedRuleEditorResources.CONSTANTS.Conditions(), RuleAttributeWidget.LOCK_LHS)); } if (!lockRHS) { hz.add(createFreezeButton(GuidedRuleEditorResources.CONSTANTS.Actions(), RuleAttributeWidget.LOCK_RHS)); } hz.add(new InfoPopup(GuidedRuleEditorResources.CONSTANTS.FrozenAreas(), GuidedRuleEditorResources.CONSTANTS.FrozenExplanation())); if (hz.getWidgetCount() > 1) { addAttribute(GuidedRuleEditorResources.CONSTANTS.FreezeAreasForEditing(), hz); } }
private void setFreezePanel(final boolean lockLHS, final boolean lockRHS) { HorizontalPanel hz = new HorizontalPanel(); if (!lockLHS) { hz.add(createFreezeButton(GuidedRuleEditorResources.CONSTANTS.Conditions(), RuleAttributeWidget.LOCK_LHS)); } if (!lockRHS) { hz.add(createFreezeButton(GuidedRuleEditorResources.CONSTANTS.Actions(), RuleAttributeWidget.LOCK_RHS)); } hz.add(new InfoPopup(GuidedRuleEditorResources.CONSTANTS.FrozenAreas(), GuidedRuleEditorResources.CONSTANTS.FrozenExplanation())); if (hz.getWidgetCount() > 1) { addAttribute(GuidedRuleEditorResources.CONSTANTS.FreezeAreasForEditing(), hz); } }
Constants.INSTANCE.FrozenExplanation() ) ); if ( hz.getWidgetCount() > 1 ) { addAttribute( Constants.INSTANCE.FreezeAreasForEditing(), hz );