/** * Causes the component to report its current dimensions and relative position via a * {@link org.fujion.event.ResizeEvent resize event}. */ public void reportSize() { invoke("reportSize"); }
/** * Creates a shaded mask over the component, effectively preventing direct user interaction. * * @param label Text to display in the center of the mask. * @param popup Popup to display when right-clicking on the mask. */ public void addMask(String label, Popup popup) { invoke("addMask", label, popup); }
/** * Creates a shaded mask over the component, effectively preventing direct user interaction. * * @param label Text to display in the center of the mask. */ public void addMask(String label) { invoke("addMask", label); }
/** * Ensures that this component is visible within the view port by scrolling if necessary. */ public void scrollIntoView() { invoke("scrollIntoView"); }
/** * Removes the mask, if present. */ public void removeMask() { invoke("removeMask"); }
/** * Sets/removes the input focus to/from this component. If the component cannot receive the * input focus, the request is ignored. * * @param focus If true, the component receives the input focus if possible. If false and the * component currently has the input focus, the focus is relinquished. */ @PropertySetter(value = "focus", defaultValue = "false", defer = true, description = "Sets or removes focus for this component.") public void setFocus(boolean focus) { invoke("focus", focus); }
/** * Print this element with the specified options. * * @param options Print options. */ public void print(PrintOptions options) { Assert.state(isRendered(), () -> "A component may not be printed if it has not yet been rendered"); invoke("print", options); } }
/** * Applies the current color setting to the target component. If the target implements a custom * method for performing this operation, that method will be invoked. Otherwise, the background * color of the target is set. Override this method to provide alternate implementations. * * @param comp Component to receive the color setting. */ protected void applyColor(BaseUIComponent comp) { if (comp instanceof BaseLabeledComponent) { comp.invoke(comp.sub("lbl"), "css", "color", getColor()); } else if (comp != null) { comp.addStyle("background-color", getColor()); } }