/** * Set the error message for the dialog box. * * @param message * Message for the error dialog */ public void setMessage(String message) { this.messagePane.setText(message); }
Object connectorValue = ((IValueConnector) value).getConnectorValue(); if (formatter != null) { renderer.setText(formatter.format(connectorValue)); } else { if (connectorValue != null) { renderer.setText(connectorValue.toString()); } else { renderer.setText(null); renderer.setText(formatter.format(value)); } else { if (value != null) { renderer.setText(value.toString()); } else { renderer.setText(null);
Object connectorValue = ((IValueConnector) value).getConnectorValue(); if (formatter != null) { renderer.setText(formatter.format(connectorValue)); } else { if (connectorValue != null) { renderer.setText(connectorValue.toString()); } else { renderer.setText(null); renderer.setText(formatter.format(value)); } else { if (value != null) { renderer.setText(value.toString()); } else { renderer.setText(null);
/** * {@inheritDoc} */ public void setStatusInfo(String statusInfo) { if (statusInfo != null && statusInfo.length() > 0) { statusBar.setText(statusInfo); statusBar.setVisible(true); } else { statusBar.setVisible(false); } }
protected void setPageCountText(int pages) { String oldVal = this.pageCountLabel.getText(); pageCountLabel.setText("/" + pages); propertyChangeSupport.firePropertyChange("pageCountText", oldVal, pageCountLabel.getText()); }
/** * {@inheritDoc} */ @Override protected void setConnecteeValue(Object aValue) { if (aValue == null) { getConnectedSComponent().setText(null); } else { if (formatter != null) { getConnectedSComponent().setText(formatter.format(aValue)); } else if (forceHtml) { if (aValue.toString().toUpperCase().indexOf(HtmlHelper.HTML_START) < 0) { getConnectedSComponent().setText( HtmlHelper.toHtml(HtmlHelper.preformat(aValue.toString()))); } else { getConnectedSComponent().setText(aValue.toString()); } } else { getConnectedSComponent().setText(aValue.toString()); } } } }
/** * Creates a new <code>SLabel</code> instance with the specified icon * and the specified text (alligned as specified). * * @param text The text to be displayed by the label. * @param icon The image to be displayed by the label. * @param horizontalAlignment One of the following constants defined in * <code>SConstants</code>: * <code>LEFT</code>, <code>CENTER</code>, <code>RIGHT</code>. * @see SConstants */ public SLabel(String text, SIcon icon, int horizontalAlignment) { setText(text); setIcon(icon); setHorizontalAlignment(horizontalAlignment); }
private SLabel createPropertyLabel(IPropertyDescriptor propertyDescriptor, @SuppressWarnings("unused") SComponent propertyComponent, Locale locale) { SLabel propertyLabel = createSLabel(); StringBuffer labelText = new StringBuffer(propertyDescriptor.getI18nName( getTranslationProvider(), locale)); if (propertyDescriptor.isMandatory()) { labelText.append("*"); propertyLabel.setForeground(Color.RED); } propertyLabel.setText(labelText.toString()); return propertyLabel; }
+ "</object>" + "</body>" + "</html>"; SLabel embedder = new SLabel(); embedder.setText(htmlText); displayModalDialog(embedder, actions, title, sourceComponent, context, dimension, reuseCurrent);
Object connectorValue = ((IValueConnector) value).getConnectorValue(); if (connectorValue != null && propertyDescriptor.isTranslated()) { renderer.setText(translationProvider.getTranslation( computeEnumerationKey(propertyDescriptor.getEnumerationName(), connectorValue), locale)); } else { renderer.setText(String.valueOf(connectorValue)); renderer.setText(translationProvider.getTranslation( computeEnumerationKey(propertyDescriptor.getEnumerationName(), value), locale)); } else { if (value == null) { renderer.setText(""); } else { renderer.setText(String.valueOf(value));
@Override public void setProperty(SComponent comp, String name, String value) { SLabel c = (SLabel) comp; switch (name) { case "ICON": c.setIcon(new SURLIcon(value)); break; case "TEXT": c.setText(value); break; default: super.setProperty(comp, name, value); break; } }
/** * Set the details section of the error dialog. If the details are either null * or an empty string, then hide the detailsPane button and hide the detail * scroll pane. Otherwise, just set the detailsPane section. * * @param details * Details to be shown in the detail section of the dialog. This * can be null if you do not want to display the details section of * the dialog. */ public void setDetails(String details) { if (details == null || details.equals("")) { setDetailsVisible(false); detailsButton.setVisible(false); } else { this.detailsPane.setText(details); setDetailsVisible(false); detailsButton.setVisible(true); } }
Object connectorValue = ((IValueConnector) value).getConnectorValue(); if (connectorValue != null && propertyDescriptor.isTranslated()) { renderer.setText(translationProvider.getTranslation( computeEnumerationKey(propertyDescriptor.getEnumerationName(), connectorValue), locale)); } else { renderer.setText(String.valueOf(connectorValue)); renderer.setText(translationProvider.getTranslation( computeEnumerationKey(propertyDescriptor.getEnumerationName(), value), locale)); } else { if (value == null) { renderer.setText(""); } else { renderer.setText(String.valueOf(value));
errorFrame.getContentPane().add(versionLabel, "WINGS_VERSION"); versionLabel.setText("wingS " + Version.getVersion() + " / " + Version.getCompileTime()); stackTrace.append(getStackTraceString(thrown)); stackTrace.append("</pre>"); errorStackTraceLabel.setText(stackTrace.toString()); errorMessageLabel.setText(thrown.getMessage() !=null ? thrown.getMessage() : "none"); errorFrame.setVisible(true); errorFrame.write(device);
/** * {@inheritDoc} */ @Override protected Object getConnecteeValue() { String text = getConnectedSComponent().getText(); if (StringUtils.isEmpty(text)) { return null; } if (formatter != null) { try { Object value = formatter.parse(getConnectedSComponent().getText()); getConnectedSComponent().setText(formatter.format(value)); return value; } catch (ParseException ex) { setConnecteeValue(null); return null; } } return text; }
titleLabel.setIcon(iconFactory.getIcon(view.getDescriptor() .getIconImageURL(), IIconFactory.TINY_ICON_SIZE)); titleLabel.setText(view.getDescriptor().getI18nName( getTranslationProvider(), locale)); titleLabel.setHorizontalAlignment(SConstants.LEFT_ALIGN);
view.getDescriptor().getIconImageURL(), getIconFactory().getTinyIconSize())); titleLabel.setText(view.getDescriptor().getI18nName(translationProvider, locale)); titleLabel.setHorizontalAlignment(SConstants.LEFT_ALIGN);
vertSlider.setMajorTickSpacing(30); vertSlider.setSnapToTicks(true); vertSlider.addChangeListener(e -> label.setText("value of slider 4 is "+ String.valueOf(((SSlider)e.getSource()).getValue())));