Пример #1
0
 public void setSizeRatio(double x, double y) {
   double rx = x;
   double ry = y;
   if (rx > 1.0) rx = x - 1.0;
   if (ry > 1.0) ry = y - 1.0;
   if (defDim.width <= 0) defDim = getPreferredSize();
   curLoc.x = (int) ((double) defLoc.x * rx);
   curLoc.y = (int) ((double) defLoc.y * ry);
   curDim.width = (int) ((double) defDim.width * rx);
   curDim.height = (int) ((double) defDim.height * ry);
   if (!inEditMode) setBounds(curLoc.x, curLoc.y, curDim.width, curDim.height);
   twin.setSizeRatio(x, y);
 }
Пример #2
0
 public void setEditMode(boolean s) {
   twin.setEditMode(s);
   setOpaque(s);
   if (s) {
     addMouseListener(ml);
     curLoc.x = defLoc.x;
     curLoc.y = defLoc.y;
     defDim = getPreferredSize();
     curDim.width = defDim.width;
     curDim.height = defDim.height;
   } else removeMouseListener(ml);
   inEditMode = s;
 }
Пример #3
0
 public void setEditStatus(boolean s) {
   isEditing = s;
   twin.setEditStatus(s);
   repaint();
 }
Пример #4
0
 public void setDefColor(String c) {
   twin.setAttribute(FGCOLOR, c);
 }
Пример #5
0
 public void setDefLabel(String s) {
   twin.setAttribute(VALUE, s);
 }
Пример #6
0
 public void updateValue() {
   twin.updateValue();
 }
Пример #7
0
 public void setShowValue(ParamIF pf) {
   twin.setShowValue(pf);
 }
Пример #8
0
 public void setValue(ParamIF pf) {
   if (pf != null) {
     twin.setAttribute(VALUE, pf.value);
   }
 }
Пример #9
0
 public void setAttribute(int attr, String c) {
   twin.setAttribute(attr, c);
 }
Пример #10
0
 public String getAttribute(int attr) {
   return twin.getAttribute(attr);
 }
Пример #11
0
 public void changeFont() {
   twin.changeFont();
 }