private void programmaticToggleState() { if (toggle != null) toggle.setExpanded(!toggle.isExpanded()); toggleState(); }
@Override protected void handleActivate(Event e) { state &= ACTIVE; redraw(); super.handleActivate(e); state &= ~ACTIVE; if (!isDisposed()) redraw(); }
/** * Sets the foreground color of the form. This color will also be used for * the body. */ @Override public void setForeground(Color fg) { super.setForeground(fg); if (content != null) { // also set in setContent() content.setForeground(fg); } }
private FormText createClient(Section section, String content, FormToolkit toolkit) { FormText text = toolkit.createFormText(section, true); try { text.setText(content, true, false); } catch (SWTException e) { text.setText(e.getMessage(), false, false); } section.setClient(text); section.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB)); text.addHyperlinkListener(this); return text; }
private void createAdvancedLink(Composite parent, FormToolkit toolkit) { advancedLink = toolkit.createHyperlink(parent, Messages.FederatedSearchPart_advanced, SWT.NULL); advancedLink.addHyperlinkListener(new HyperlinkAdapter() { public void linkActivated(HyperlinkEvent e) { doAdvanced(); } }); TableWrapData td = new TableWrapData(); td.colspan = 2; advancedLink.setLayoutData(td); }
@Override protected void internalSetExpanded(boolean expanded) { super.internalSetExpanded(expanded); if ((getExpansionStyle() & TITLE_BAR) != 0) { if (!expanded) super.setBackgroundImage(null); } reflow(); }
/** * Programmatically changes expanded state. * * @param expanded * the new expanded state */ public void setExpanded(boolean expanded) { internalSetExpanded(expanded); if (toggle != null) toggle.setExpanded(expanded); }
/** * Sets the background color of the form. This color will also be used for * the body. */ @Override public void setBackground(Color bg) { super.setBackground(bg); if (content != null) { // also set in super.setContent() content.setBackground(bg); } }
@Override public void setEnabled(boolean enabled) { super.setEnabled(enabled); redraw(); } }
/** * Fully delegates the size computation to the internal layout manager. */ @Override public final Point computeSize(int wHint, int hHint, boolean changed) { return ((FormLayout) getLayout()).computeSize(this, wHint, hHint, changed); }
@Override protected void internalSetExpanded(boolean expanded) { super.internalSetExpanded(expanded); if ((getExpansionStyle() & TITLE_BAR) != 0) { if (!expanded) super.setBackgroundImage(null); } reflow(); }
private void programmaticToggleState() { if (toggle != null) toggle.setExpanded(!toggle.isExpanded()); toggleState(); }
@Override protected void handleActivate(Event e) { state &= ACTIVE; redraw(); super.handleActivate(e); state &= ~ACTIVE; if (!isDisposed()) redraw(); }
/** * Sets the foreground color of the form. This color will also be used for * the body. */ @Override public void setForeground(Color fg) { super.setForeground(fg); if (content != null) { // also set in setContent() content.setForeground(fg); } }
/** * Sets the background color of the form. This color will also be used for * the body. */ @Override public void setBackground(Color bg) { super.setBackground(bg); if (content != null) { // also set in super.setContent() content.setBackground(bg); } }