/** * Creates a label. * * @return the created label. */ protected SLabel createSLabel() { return new SLabel(); }
/** * Returns an SLabel representing the visual representation of the Transferable transferable * Note: (calls SIcon getVisualRepresentation(Transferable)) * @param transferable * @return */ public SLabel getVisualRepresentationLabel(Transferable transferable) { SIcon icon = getVisualRepresentation(transferable); if(icon == null) return null; if(label == null) label = new SLabel(); label.setIcon(icon); return label; }
+ "pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />" + "</object>" + "</body>" + "</html>"; SLabel embedder = new SLabel(); embedder.setText(htmlText); displayModalDialog(embedder, actions, title, sourceComponent, context,
/** * Creates a label. * * @param bold * make it bold ? * @return the created label. */ protected SLabel createSLabel(boolean bold) { // To have preferred height computed. SLabel label = new SLabel(" "); if (bold) { label.setFont(createFont(BOLD_FONT, label.getFont())); } return label; }
public void showOption(SComponent c, String title, Object message) { if (title != null) setTitle(title); optionData.removeAll(); if (message instanceof SComponent) { optionData.add((SComponent) message); } else if (message != null) { StringTokenizer stringTokenizer = new StringTokenizer(message.toString(), "\n"); while (stringTokenizer.hasMoreElements()) { SLabel label = new SLabel(stringTokenizer.nextElement().toString()); if (SOptionPane.defaultSize != null && SOptionPane.defaultSize.getWidthInt() != SDimension.AUTO_INT) { label.setWordWrap(true); } optionData.add(label); } } setOwner(c); show(); }
@Override public void activateExample() { SLabel left = new SLabel("left"); left.setPreferredSize(SDimension.FULLAREA); left.setBorder(new SLineBorder(1)); SLabel right = new SLabel("right"); right.setPreferredSize(SDimension.FULLAREA); right.setBorder(new SLineBorder(1)); splitPane = new MySSplitPane(left, right); splitPane.setPreferredSize(SDimension.FULLAREA); //controls.addControllable(splitPane); }
static void addCompForBorder(SBorder border, String description, SContainer container) { SPanel comp = new SPanel(new SGridLayout(1, 1)); SLabel label = new SLabel(description, SConstants.CENTER); comp.add(label); comp.setBorder(border); // container.add(Box.createRigidArea(new Dimension(0, 10))); container.add(comp); }
errorFrame.getContentPane().setLayout(layout); final SLabel errorStackTraceLabel = new SLabel(); errorFrame.getContentPane().add(errorStackTraceLabel, "EXCEPTION_STACK_TRACE"); final SLabel errorMessageLabel = new SLabel(); errorFrame.getContentPane().add(errorMessageLabel, "EXCEPTION_MESSAGE"); final SLabel versionLabel = new SLabel(); errorFrame.getContentPane().add(versionLabel, "WINGS_VERSION");
gbc.gridheight = 1; gbc.insets = new Insets(22, 12, 11, 17); iconLabel = new SLabel(); pane.add(iconLabel, gbc); messagePane = new SLabel(); gbc = new GridBagConstraints(); gbc.anchor = GridBagConstraints.WEST; pane.add(detailsButton, gbc); detailsPane = new SLabel(); SScrollPane detailsScrollPane = new SScrollPane(detailsPane); detailsScrollPane.setMode(SScrollPane.MODE_COMPLETE);
@Override public void activateExample() { final SLabel label = new SLabel(""); form.add(new SLabel("slider 1 [0,200]")); form.add(horizSlider1); form.add(new SLabel("slider 2 [-100, 100]")); form.add(horizSlider2); form.add(new SLabel("slider 3 [-400, -200], snaps to every 25 ticks")); form.add(horizSlider3); form.add(new SLabel("slider 4 [0, 300], snaps to every 30 ticks")); form.add(vertSlider);
/** * Initialize the DefaultCellEditor with an editor component (like an text * field for instance). After calling this constructor, the * {@link EditorDelegate}, that links the CellEditor and the * editorComponent has to be passed to the delegate instance variable. * * @param editorComponent the component used * @param initializeButtons flag to indicate if the button texts and icons * should be initialized. */ protected SDefaultCellEditor(SComponent editorComponent, boolean initializeButtons) { this.messageLabel = new SLabel(); this.editorPanel = new EditorPanel(); this.ok = new SClickable(); this.cancel = new SClickable(); this.listenerList = new EventListenerList(); this.editorComponent = editorComponent; editorPanel.add(messageLabel); editorPanel.add(editorComponent); if (initializeButtons) { initButtons(); } }
private void createControllerFrame() { controllerFrame = new SFrame(); String w = "95%"; String h = "768px"; if (getFrameWidth() != null) { w = getFrameWidth().intValue() + "px"; } if (getFrameHeight() != null) { h = getFrameHeight().intValue() + "px"; } controllerFrame.setPreferredSize(new SDimension(w, h)); controllerFrame.getContentPane().setPreferredSize(SDimension.FULLAREA); cardPanel = new SPanel(new SCardLayout()); cardPanel.setPreferredSize(SDimension.FULLAREA); controllerFrame.getContentPane().add(cardPanel, SBorderLayout.CENTER); statusBar = new SLabel(); statusBar.setBorder(new SLineBorder(1)); statusBar.setVisible(false); controllerFrame.getContentPane().add(statusBar, BorderLayout.SOUTH); updateFrameTitle(); controllerFrame.setVisible(true); }
new SLabel(getTranslation( LoginUtils.CRED_MESSAGE, getLocale())), SBorderLayout.NORTH); mainPanel.add(loginView.getPeer(), SBorderLayout.CENTER);