List of usage examples for com.google.gwt.user.client.ui Widget removeStyleDependentName
public void removeStyleDependentName(String styleSuffix)
From source file:com.eas.window.WindowPanel.java
@Override public void deactivate() { if (active) { active = false;//w ww. j a va 2 s.c o m if (captionWidget != null) { captionWidget.removeStyleDependentName(ACTIVE_SUFFIX_NAMNE); } Widget[] widgets = new Widget[] { n, s, w, e, ne, nw, se, sw, content }; for (Widget _w : widgets) { _w.removeStyleDependentName(ACTIVE_SUFFIX_NAMNE); } DeactivateEvent.<WindowUI>fire(this, this); } }
From source file:com.gmail.cjbooms.thesis.pythonappengine.client.menus.Toolbar.java
License:Open Source License
public void setButtonEnabled(int index, boolean enabled) { Widget btn = buttons.get(index); if (btn != null) { if (enabled) { btn.removeStyleDependentName("Disabled"); } else {// www . j av a 2 s. com btn.addStyleDependentName("Disabled"); } } }
From source file:com.vaadin.client.ui.calendar.schedule.DayToolbar.java
License:Apache License
private void updateWidgetSizedStyleName(Widget w) { if (verticalSized) { w.addStyleDependentName("Vsized"); } else {/* w w w. ja v a 2 s . c o m*/ w.removeStyleDependentName("VSized"); } if (horizontalSized) { w.addStyleDependentName("Hsized"); } else { w.removeStyleDependentName("HSized"); } }
From source file:edu.cudenver.bios.glimmpse.client.panels.StepsLeftPanel.java
License:Open Source License
/** * Highlight the current step in the user navigation * //from w ww .j a va 2 s . c o m * Select the "step" at the new index, and unselect the step * at the old index by updating the dependent style sheet names * * @param newIndex * @param prevIndex */ protected void updateStep(Widget oldStep, String styleNameForOldStep, Widget newStep) { // deselect the old widgets oldStep.removeStyleDependentName(GlimmpseConstants.STYLE_WIZARD_STEP_SELECTED); oldStep.addStyleDependentName(styleNameForOldStep); // select the new widgets newStep.removeStyleDependentName(GlimmpseConstants.STYLE_WIZARD_STEP_DESELECTED); newStep.addStyleDependentName(GlimmpseConstants.STYLE_WIZARD_STEP_SELECTED); }
From source file:edu.cudenver.bios.glimmpse.client.panels.StepsLeftPanel.java
License:Open Source License
/** * Call back when "next" navigation button is clicked * Does nothing if already at end of step list *///ww w .j av a2 s . c o m public void onNext() { if (currentStep < stepList.size() - 1) { Widget oldStep = stepList.get(currentStep); Widget newStep = stepList.get(++currentStep); // deselect the old widgets oldStep.removeStyleDependentName(GlimmpseConstants.STYLE_WIZARD_STEP_SELECTED); oldStep.addStyleDependentName(STYLE_COMPLETE); // select the new widgets newStep.removeStyleDependentName(GlimmpseConstants.STYLE_WIZARD_STEP_DESELECTED); newStep.addStyleDependentName(GlimmpseConstants.STYLE_WIZARD_STEP_SELECTED); } }
From source file:edu.cudenver.bios.glimmpse.client.panels.StepsLeftPanel.java
License:Open Source License
/** * Call back when "next" navigation button is clicked * Does nothing if already at end of step list *///from w w w . j av a 2 s . co m public void onPrevious() { if (currentStep > 0) { Widget oldStep = stepList.get(currentStep); Widget newStep = stepList.get(--currentStep); // deselect the old widgets oldStep.removeStyleDependentName(GlimmpseConstants.STYLE_WIZARD_STEP_SELECTED); oldStep.addStyleDependentName(GlimmpseConstants.STYLE_WIZARD_STEP_DESELECTED); // select the new widgets newStep.removeStyleDependentName(STYLE_COMPLETE); newStep.addStyleDependentName(GlimmpseConstants.STYLE_WIZARD_STEP_SELECTED); } }
From source file:edu.cudenver.bios.glimmpse.client.panels.StepsLeftPanel.java
License:Open Source License
public void reset() { if (currentStep > 0) { Widget oldStep = stepList.get(currentStep); currentStep = 0;/*w w w .j ava 2s.com*/ Widget newStep = stepList.get(currentStep); // deselect the old widgets oldStep.removeStyleDependentName(GlimmpseConstants.STYLE_WIZARD_STEP_SELECTED); oldStep.addStyleDependentName(GlimmpseConstants.STYLE_WIZARD_STEP_DESELECTED); // select the new widgets newStep.removeStyleDependentName(STYLE_COMPLETE); newStep.addStyleDependentName(GlimmpseConstants.STYLE_WIZARD_STEP_SELECTED); } }
From source file:edu.ucdenver.bios.glimmpseweb.client.shared.DynamicTabPanel.java
License:Open Source License
private void clearStyles(Widget w) { // clear all previous styles w.removeStyleDependentName(GlimmpseConstants.STYLE_LEFT); w.removeStyleDependentName(GlimmpseConstants.STYLE_LEFT_ACTIVE); w.removeStyleDependentName(GlimmpseConstants.STYLE_LEFT_NEXT_TO_ACTIVE); w.removeStyleDependentName(GlimmpseConstants.STYLE_MIDDLE); w.removeStyleDependentName(GlimmpseConstants.STYLE_MIDDLE_ACTIVE); w.removeStyleDependentName(GlimmpseConstants.STYLE_MIDDLE_NEXT_TO_ACTIVE); w.removeStyleDependentName(GlimmpseConstants.STYLE_RIGHT); w.removeStyleDependentName(GlimmpseConstants.STYLE_RIGHT_ACTIVE); w.removeStyleDependentName(GlimmpseConstants.STYLE_SINGLE); }
From source file:eu.nextstreet.gwt.components.client.ui.widget.suggest.impl.table.SimpleTableRowItemRenderer.java
License:Apache License
public void removeStyleDependentName(String styleSuffix) { for (Widget widget : this) { widget.removeStyleDependentName(styleSuffix); }//from w w w . j a va2 s.c o m }
From source file:gwtBlocks.client.views.WidgetFactory.java
License:Apache License
private static MouseListener getIconMouseListener(final String suffix) { if (_iconMouseListener == null) _iconMouseListener = new MouseListenerAdapter() { public void onMouseDown(Widget sender, int x, int y) { sender.addStyleDependentName("down"); if (suffix != null) sender.addStyleDependentName("down-" + suffix); }/*from w ww .j a v a 2 s. c o m*/ public void onMouseUp(Widget sender, int x, int y) { sender.removeStyleDependentName("down"); sender.removeStyleDependentName("down-" + suffix); } public void onMouseEnter(Widget sender) { sender.addStyleDependentName("hover"); if (suffix != null) sender.addStyleDependentName("hover-" + suffix); } public void onMouseLeave(Widget sender) { sender.removeStyleDependentName("hover"); sender.removeStyleDependentName("down"); sender.removeStyleDependentName("hover-" + suffix); sender.removeStyleDependentName("down-" + suffix); } }; return _iconMouseListener; }