Home | History | Annotate | Download | only in gle2

Lines Matching defs:label

57  * heavier gradient during mouse-overs. It also uses a bold label along with the eclipse
192 * produce the heading label
217 final CLabel label = new CLabel(this, SWT.SHADOW_OUT);
218 label.setText(header.toString().replace("&", "&&")); //$NON-NLS-1$ //$NON-NLS-2$
219 updateBackground(label, false);
223 label.setFont(labelFont);
224 label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
225 setHeader(header, label);
226 label.addMouseListener(new MouseAdapter() {
230 toggle(label, true, mSingle);
234 label.addMouseTrackListener(new MouseTrackListener() {
237 updateBackground(label, true);
242 updateBackground(label, false);
259 setContentArea(label, scrolledComposite);
284 updateIcon(label);
285 if (expand != null && expand.contains(label.getText())) {
286 // Comparing "label.getText()" rather than "header" because we make some
287 // tweaks to the label (replacing & with && etc) and in the getExpandedCategories
288 // method we return the label texts
289 expandLabels.add(label);
294 for (CLabel label : expandLabels) {
295 toggle(label, false, false);
299 /** Updates the background gradient of the given header label */
300 private void updateBackground(CLabel label, boolean mouseOver) {
301 Display display = label.getDisplay();
302 label.setBackground(new Color[] {
312 * Updates the icon for a header label to be open/close based on the {@link #isOpen}
315 private void updateIcon(CLabel label) {
316 label.setImage(isOpen(label) ? mOpen : mClosed);
319 /** Returns true if the content area for the given label is open/showing */
320 private boolean isOpen(Control label) {
321 return !((GridData) getContentArea(label).getLayoutData()).exclude;
324 /** Toggles the visibility of the children of the given label */
325 private void toggle(CLabel label, boolean performLayout, boolean autoClose) {
329 ScrolledComposite scrolledComposite = getContentArea(label);
335 updateIcon(label);
338 Object header = getHeader(label);
353 /** Returns the header object for the given header label */
354 private Object getHeader(Control label) {
355 return label.getData(KEY_HEADER);
358 /** Sets the header object for the given header label */
359 private void setHeader(Object header, final CLabel label) {
360 label.setData(KEY_HEADER, header);
363 /** Returns the content area for the given header label */
364 private ScrolledComposite getContentArea(Control label) {
365 return (ScrolledComposite) label.getData(KEY_CONTENT);
368 /** Sets the content area for the given header label */
369 private void setContentArea(final CLabel label, ScrolledComposite scrolledComposite) {
370 label.setData(KEY_CONTENT, scrolledComposite);