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