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