public Component getFellowIfAny(String name) { return _comp.getFellowIfAny(name); }
/** * Returns the label associated with the named pane, or creates a new one if necessary. * * @param pane Name of the pane * @return The associated label. */ private Label getLabel(String pane) { Label lbl = (Label) root.getFellowIfAny(pane); return lbl == null ? createLabel(pane) : lbl; }
private Object getFellow(Object x, String fdname) { return x instanceof Page ? ((Page) x).getFellowIfAny(fdname, true) : x instanceof Component ? ((Component) x).getFellowIfAny(fdname, true) : null; }
/** Returns the component of the specified ID or UUID. * ID could be the component's ID or UUID. * To specify an UUID, it must be the format: <code>uuid(comp_uuid)</code>. * @return the component, or null if not found * @since 5.0.4 */ public static Component getComponentById(Component comp, String id) { final int len = id.length(); if (id.startsWith("uuid(") && id.charAt(len - 1) == ')') { Desktop dt = comp.getDesktop(); if (dt == null) { final Execution exec = Executions.getCurrent(); if (exec == null) return null; dt = exec.getDesktop(); } return dt != null ? dt.getComponentByUuidIfAny(id.substring(5, len - 1)) : null; } return comp.getFellowIfAny(id); }
/** Returns the component representing the area that the click occurs, * or null if not associated with any component. * <p>This method assumes {@link #getArea} is either a component's ID * or a component's UUID. It is true when {@link org.zkoss.zul.Area} is used * to partition a component, such as {@link org.zkoss.zul.Imagemap} and {@link org.zkoss.zul.Chart}. * @since 5.0.4 */ public Component getAreaComponent() { if (_areacomp == null && _area != null) { final Component target = getTarget(); Desktop desktop = null; if (target != null) { _areacomp = target.getFellowIfAny(_area); if (_areacomp != null) return _areacomp; desktop = target.getDesktop(); } if (desktop == null) { final Execution exec = Executions.getCurrent(); if (exec != null) desktop = exec.getDesktop(); } if (desktop != null) return _areacomp = desktop.getComponentByUuidIfAny(_area); } return _areacomp; }
rt2 = rt.getFellowIfAny(seq.getId());
for (int i = 0; i < _posOffset; i++) { SimpleSelectorSequence seq = selector.get(i); Component rt2 = rt.getFellowIfAny(seq.getId());