示例#1
0
 public Positionable finishClone(Positionable p) {
   PositionableLabel pos = (PositionableLabel) p;
   pos._text = _text;
   pos._icon = _icon;
   pos._control = _control;
   //        pos._rotateText = _rotateText;
   pos._unRotatedText = _unRotatedText;
   pos.setLocation(getX(), getY());
   pos._displayLevel = _displayLevel;
   pos._controlling = _controlling;
   pos._hidden = _hidden;
   pos._positionable = _positionable;
   pos._showTooltip = _showTooltip;
   pos.setTooltip(getTooltip());
   pos._editable = _editable;
   if (getPopupUtility() == null) {
     pos.setPopupUtility(null);
   } else {
     pos.setPopupUtility(getPopupUtility().clone(pos, pos.getTextComponent()));
   }
   pos.setOpaque(isOpaque());
   if (_namedIcon != null) {
     pos._namedIcon = cloneIcon(_namedIcon, pos);
     pos.setIcon(pos._namedIcon);
     pos.rotate(_degrees); // this will change text in icon with a new _namedIcon.
   }
   pos.updateSize();
   return pos;
 }
示例#2
0
 @Override
 public void setText(String text) {
   _unRotatedText = text;
   _text =
       (text != null
           && text.length()
               > 0); // when "" is entered for text, and a font has been specified, the descender
                     // distance moves the position
   if (
   /*_rotateText &&*/ !isIcon() && _namedIcon != null) {
     log.debug("setText calls rotate({})", _degrees);
     rotate(_degrees); // this will change text label as a icon with a new _namedIcon.
   } else {
     log.debug("setText calls super.setText()");
     super.setText(text);
   }
 }