Example #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);
 }
Example #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;
 }
Example #3
0
 public void setEditStatus(boolean s) {
   isEditing = s;
   twin.setEditStatus(s);
   repaint();
 }
Example #4
0
 public void setDefColor(String c) {
   twin.setAttribute(FGCOLOR, c);
 }
Example #5
0
 public void setDefLabel(String s) {
   twin.setAttribute(VALUE, s);
 }
Example #6
0
 public void updateValue() {
   twin.updateValue();
 }
Example #7
0
 public void setShowValue(ParamIF pf) {
   twin.setShowValue(pf);
 }
Example #8
0
 public void setValue(ParamIF pf) {
   if (pf != null) {
     twin.setAttribute(VALUE, pf.value);
   }
 }
Example #9
0
 public void setAttribute(int attr, String c) {
   twin.setAttribute(attr, c);
 }
Example #10
0
 public String getAttribute(int attr) {
   return twin.getAttribute(attr);
 }
Example #11
0
 public void changeFont() {
   twin.changeFont();
 }