/** * Set the detailsPane section to be either visible or invisible. Set the text * of the Details button accordingly. * * @param b * if true detailsPane section will be visible */ private void setDetailsVisible(boolean b) { if (b) { collapsedHeight = 200; int height; if (expandedHeight == 0) { height = collapsedHeight + 300; } else { height = expandedHeight; } detailsPanel.setVisible(true); detailsButton.setText(translationProvider.getTranslation("details", locale) + " <<"); setPreferredSize(new SDimension(null, height + "px")); } else { detailsPanel.setVisible(false); detailsButton.setText(translationProvider.getTranslation("details", locale) + " >>"); setPreferredSize(new SDimension(null, collapsedHeight + "px")); } } }
backButton.setText(translationProvider.getTranslation(wizardStep .getPreviousLabelKey(), locale)); } else { backButton.setText(translationProvider.getTranslation( IWizardStepDescriptor.DEFAULT_PREVIOUS_KEY, locale)); nextButton.setText(translationProvider.getTranslation(wizardStep .getNextLabelKey(), locale)); } else { nextButton.setText(translationProvider.getTranslation( IWizardStepDescriptor.DEFAULT_NEXT_KEY, locale));
/** * Sets the action field action. * * @param actions * the action field actions. */ public void setActions(List<Action> actions) { if (!ObjectUtils.equals(this.actions, actions)) { buttonPanel.removeAll(); this.actions = actions; for (Action action : actions) { SButton actionButton = new SButton(); actionButton.setAction(action); actionButton.setDisabledIcon(actionButton.getIcon()); actionButton.setActionCommand("*"); actionButton.setText(null); actionButton.setShowAsFormComponent(false); actionButton.setBorder(SBorderFactory.createSLineBorder(Color.GRAY)); if (showTextField) { if (defaultAction == null) { defaultAction = action; textField.addActionListener(action); } } buttonPanel.add(actionButton); } } }
actionButton.setText(""); break; case LABEL:
/** * {@inheritDoc} */ @Override protected IView<SComponent> createActionView( IActionViewDescriptor viewDescriptor, IActionHandler actionHandler, Locale locale) { SButton viewComponent = createSButton(); IValueConnector connector = getConnectorFactory().createValueConnector( ModelRefPropertyConnector.THIS_PROPERTY); connector.setExceptionHandler(actionHandler); IView<SComponent> view = constructView(viewComponent, viewDescriptor, connector); viewComponent.setAction(getActionFactory().createAction( viewDescriptor.getAction(), viewDescriptor.getPreferredSize(), actionHandler, view, locale)); switch (viewDescriptor.getRenderingOptions()) { case ICON: viewComponent.setText(null); break; case LABEL: viewComponent.setIcon(null); break; default: break; } return view; }
+ acceleratorString + "</FONT></HTML>"); actionButton.setText(""); toolBar.add(actionButton);
final SButton finishButton = new SButton(getIconFactory(context).getIcon( finishAction.getIconImageURL(), IIconFactory.SMALL_ICON_SIZE)); finishButton.setText(finishAction.getI18nName( getTranslationProvider(context), getLocale(context))); SButton cancelButton = new SButton(getIconFactory(context).getCancelIcon( IIconFactory.SMALL_ICON_SIZE)); cancelButton.setText(getTranslationProvider(context).getTranslation( "cancel", getLocale(context)));