/** * Looks up and returns the constraints for the specified component. * A copy of the actualCellConstraints object is returned. * * @param component the component to be queried * @return the CellConstraints for the specified component * @throws NullPointerException if {@code component} is {@code null} * @throws IllegalStateException if {@code component} has not been * added to the container */ public CellConstraints getConstraints(Component component) { return (CellConstraints) getConstraints0(component).clone(); }
/** * Looks up and returns the constraints for the specified component. * A copy of the actual <code>CellConstraints</code> object is returned. * * @param component the component to be queried * @return the <code>CellConstraints</code> for the specified component * @throws NullPointerException if component is <code>null</code> or * has not been added to the container */ public CellConstraints getConstraints(Component component) { return (CellConstraints) getConstraints0(component).clone(); }
/** * Specifies whether the given component shall be taken into account * for sizing and positioning. This setting overrides the container-wide * default. See {@link #setHonorsVisibility(boolean)} for details. * * @param component the component that shall get an individual setting * @param b <code>Boolean.TRUE</code> to override the container * default and honor the visibility for the given component, * <code>Boolean.FALSE</code> to override the container default and * ignore the visibility for the given component, * <code>null</code> to use the container default value as specified * by {@link #getHonorsVisibility()}. * * @since 1.2 */ public void setHonorsVisibility(Component component, Boolean b) { CellConstraints constraints = getConstraints0(component); if (FormUtils.equals(b, constraints.honorsVisibility)) return; constraints.honorsVisibility = b; invalidateAndRepaint(component.getParent()); }
/** * Specifies whether the given component shall be taken into account * for sizing and positioning. This setting overrides the container-wide * default. See {@link #setHonorsVisibility(boolean)} for details. * * @param component the component that shall get an individual setting * @param b {@code Boolean.TRUE} to override the container * default and honor the visibility for the given component, * {@code Boolean.FALSE} to override the container default and * ignore the visibility for the given component, * {@code null} to use the container default value as specified * by {@link #getHonorsVisibility()}. * * @since 1.2 */ public void setHonorsVisibility(Component component, Boolean b) { CellConstraints constraints = getConstraints0(component); if (Objects.equals(b, constraints.honorsVisibility)) { return; } constraints.honorsVisibility = b; invalidateAndRepaint(component.getParent()); }