/** * Sets the font of the form. This font will be used to render the title * text. It will not affect the body. */ @Override public void setFont(Font font) { super.setFont(font); if (getContent() != null) getContent().setFont(font); }
/** * Sets the background of the control and its content. * * @param bg * the new background color */ @Override public void setBackground(Color bg) { super.setBackground(bg); if (getContent() != null) getContent().setBackground(bg); }
/** * Sets the foreground of the control and its content. * * @param fg * the new foreground color */ @Override public void setForeground(Color fg) { super.setForeground(fg); if (getContent() != null) getContent().setForeground(fg); }
/** * Sets the foreground of the control and its content. * * @param fg * the new foreground color */ @Override public void setForeground(Color fg) { super.setForeground(fg); if (getContent() != null) getContent().setForeground(fg); }
/** * Sets the background of the control and its content. * * @param bg * the new background color */ @Override public void setBackground(Color bg) { super.setBackground(bg); if (getContent() != null) getContent().setBackground(bg); }
/** * Sets the font of the form. This font will be used to render the title * text. It will not affect the body. */ @Override public void setFont(Font font) { super.setFont(font); if (getContent() != null) getContent().setFont(font); }
/** * If content is set, transfers focus to the content. */ @Override public boolean setFocus() { boolean result; FormUtil.setFocusScrollingEnabled(this, false); if (getContent() != null) result = getContent().setFocus(); else result = super.setFocus(); FormUtil.setFocusScrollingEnabled(this, true); return result; }
/** * If content is set, transfers focus to the content. */ @Override public boolean setFocus() { boolean result; FormUtil.setFocusScrollingEnabled(this, false); if (getContent() != null) result = getContent().setFocus(); else result = super.setFocus(); FormUtil.setFocusScrollingEnabled(this, true); return result; }
private void updateSizeWhilePending() { Control c = getContent(); Rectangle area = getClientArea(); setMinSize(area.width, c.getSize().y); }
private void updateSizeWhilePending() { Control c = getContent(); Rectangle area = getClientArea(); setMinSize(area.width, c.getSize().y); }
Composite c = (Composite) getContent(); Rectangle clientArea = getClientArea(); if (c == null)
Composite c = (Composite) getContent(); Rectangle clientArea = getClientArea(); if (c == null)