Specifies a new LabelAnimator to handle calls to show/hide the label

@param labelAnimator LabelAnimator to use; null causes use of the default LabelAnimator
554655
public void setLabelAnimator(LabelAnimator labelAnimator) {
        if (labelAnimator == null) {
            this.labelAnimator = new DefaultLabelAnimator();
        } else {
            if (this.labelAnimator != null) {
                labelAnimator.setLabelAnchored(getInputWidget(), getFloatingLabel(), this.labelAnimator.isAnchored());
            }
            this.labelAnimator = labelAnimator;
        }

        if (isInEditMode()) {
            this.labelAnimator.setLabelAnchored(getInputWidget(), getFloatingLabel(), false);
        }
    }
601017
@Nullable
  public static ValueAnimator createValueAnimator(Drawable drawable, int maxDurationMs) {
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
      return null;
    }

    if (drawable instanceof AnimatedDrawable2) {
      return AnimatedDrawable2ValueAnimatorHelper.createValueAnimator(
          (AnimatedDrawable2) drawable,
          maxDurationMs);
    }
    return null;
  }
615634
public static Label newLabel(final String id, final String label)
	{
		return ComponentFactory.newLabel(id, Model.of(label));
	}
609486
public void setListLabels(String chosenLabel, String sourceLabel) {
        if (chosenLabel != null) {
            this.chosenLabel.setText(chosenLabel);
            this.chosenLabel.setVisible(true);
        } else {
            this.chosenLabel.setVisible(false);
        }

        if (sourceLabel != null) {
            this.sourceLabel.setText(sourceLabel);
            this.sourceLabel.setVisible(true);
        } else {
            this.sourceLabel.setVisible(false);
        }

        Dimension d = chosenList.getPreferredSize();
        Dimension d1 = this.chosenLabel.getPreferredSize();
        Dimension dChosenPanel = chosenPanel.getPreferredSize();

        dChosenPanel.width = Math.max(d.width, Math.max(dChosenPanel.width, d1.width));
        chosenPanel.setPreferredSize(dChosenPanel);

        Dimension dSourceList = sourceList.getPreferredSize();
        Dimension dSource = this.sourceLabel.getPreferredSize();
        Dimension dSourcePanel = sourcePanel.getPreferredSize();
        dSourcePanel.width = Math.max(dSource.width, Math.max(dSourceList.width, dSourcePanel.width));
        sourcePanel.setPreferredSize(dSourcePanel);

        Dimension fullPanelSize = getPreferredSize();
        fullPanelSize.width =
                dSourcePanel.width + dChosenPanel.width + (editButton != null ? editButton.getPreferredSize().width : 0)
                        + (buttonPanel != null ? buttonPanel.getPreferredSize().width : 0) + 20;
        setPreferredSize(fullPanelSize);
    }
1145021
public static Label.Builder generateLabelBuilder(final String label) {
        return addLabel(Label.newBuilder(), Locale.getDefault(), label);
    }
644816
protected void fireLabelProviderChanged(
			final LabelProviderChangedEvent event)
	{
		Object[] listeners = fListeners.getListeners();
		for (int i = 0; i < listeners.length; ++i)
		{
			final ILabelProviderListener l = (ILabelProviderListener) listeners[i];
			SafeRunner.run(new SafeRunnable()
			{
				public void run()
				{
					l.labelProviderChanged(event);
				}
			});
		}
	}
216356
public final Statement labelStart(final Label label) {
    return new Statement() {
      @Override
      protected void doGen(CodeBuilder adapter) {
        adapter.mark(label);
        Statement.this.gen(adapter);
      }
    };
  }
374751
private Label createLabel(String label) {
        Pane pane = new Pane();
        root.addChild(pane);
        Label lbl = new Label();
        lbl.setName(label);
        pane.addChild(lbl);
        adjustPanes();
        return lbl;
    }
952712
@SuppressWarnings("unchecked")
    public void setCustomAnnotator(String customAnnotator) {
        if (isNotBlank(customAnnotator)) {
            try {
                this.customAnnotator = (Class<? extends Annotator>) Class.forName(customAnnotator);
            } catch (ClassNotFoundException e) {
                throw new IllegalArgumentException(e);
            }
        } else {
            this.customAnnotator = NoopAnnotator.class;
        }
    }
495962
@Override
	public void setLabeled(boolean labeled) {
		this.labeled = labeled;
		if (labeled) {
			eventBus.fireEvent(new LayerLabelShowEvent(this));
		} else {
			eventBus.fireEvent(new LayerLabelHideEvent(this));
		}
	}
580017
public void addValidator(final FieldValidator validator) {
		WComponent labelField = findComponentForLabel(field);

		if (labelField instanceof Input) {
			((Input) labelField).addValidator(validator);
		}
	}
708335
private void labelIndicatorSetColorsToDefaultState(JLabel label) {
        if (label == null || settings == null) {
            return;
        }
        if (label == labelMonth || label == labelYear) {
            label.setBackground(settings.getColor(DateArea.BackgroundMonthAndYearMenuLabels));
            monthAndYearInnerPanel.setBackground(settings.getColor(DateArea.BackgroundMonthAndYearMenuLabels));
        }
        if (label == labelSetDateToToday) {
            label.setBackground(settings.getColor(DateArea.BackgroundTodayLabel));
        }
        if (label == labelClearDate) {
            label.setBackground(settings.getColor(DateArea.BackgroundClearLabel));
        }
        label.setBorder(new CompoundBorder(
            new EmptyBorder(1, 1, 1, 1), labelIndicatorEmptyBorder));
    }
1132671
public void removeCustomTickLabel(final String TICK_LABEL) {
        if (null == TICK_LABEL) return;
        if (customTickLabels.contains(TICK_LABEL)) customTickLabels.remove(TICK_LABEL);
        fireUpdateEvent(REDRAW_EVENT);
    }
1365719
private void initializeScrollAnimator() {
		ScrollAnimator scrollAnimator = new ScrollAnimator(button_menu, new ObjectAnimatorFactory());
		scrollAnimator.configureListView(lv_contacts);
		scrollAnimator.setDurationInMillis(300);
	}
237576
public static InsnList addLabel(LabelNode labelNode) {
        Validate.notNull(labelNode);

        InsnList ret = new InsnList();
        ret.add(labelNode);

        return ret;
    }
555536
@Requires("label != null")
  protected static boolean labelIsResolved(Label label) {
    try {
      label.getOffset();
    } catch (IllegalStateException e) {
      return false;
    }
    return true;
  }
981313
private void drawLabels() {
		// Abort if not attached
		if (!isAttached()) {
			return;
		}

		// Draw the labels
		int lineWidth = lineElement.getOffsetWidth();
		if (numLabels > 0) {
			// Create the labels or make them visible
			for (int i = 0; i <= numLabels; i++) {
				Element label = null;
				if (i < labelElements.size()) {
					label = labelElements.get(i);
				} else { // Create the new label
					label = DOM.createDiv();
					DOM.setStyleAttribute(label, "position", "absolute");
					DOM.setStyleAttribute(label, "display", "none");
					if (enabled) {
						DOM.setElementProperty(label, "className", "ks-SliderBar-label");
					} else {
						DOM.setElementProperty(label, "className", "ks-SliderBar-label-disabled");
					}
					DOM.appendChild(getElement(), label);
					labelElements.add(label);
				}

				// Set the label text
				double value = minValue + (getTotalRange() * i / numLabels);
				DOM.setStyleAttribute(label, "visibility", "hidden");
				DOM.setStyleAttribute(label, "display", "");
				DOM.setElementProperty(label, "innerHTML", formatLabel(value));

				// Move to the left so the label width is not clipped by the
				// shell
				DOM.setStyleAttribute(label, "left", "0px");

				// Position the label and make it visible
				int labelWidth = label.getOffsetWidth();
				int labelLeftOffset = lineLeftOffset + (lineWidth * i / numLabels) - (labelWidth / 2);
//				labelLeftOffset = Math.min(labelLeftOffset, lineLeftOffset + lineWidth - labelWidth);
//				labelLeftOffset = Math.max(labelLeftOffset, lineLeftOffset);
				DOM.setStyleAttribute(label, "left", labelLeftOffset + "px");
				DOM.setStyleAttribute(label, "visibility", "visible");
			}

			// Hide unused labels
			for (int i = (numLabels + 1); i < labelElements.size(); i++) {
				DOM.setStyleAttribute(labelElements.get(i), "display", "none");
			}
		} else { // Hide all labels
			for (Element elem : labelElements) {
				DOM.setStyleAttribute(elem, "display", "none");
			}
		}
	}