/** * Traverses a component tree and sets mandatory backgrounds * to text components that have blank content and have been marked * as mandatory with {@link #setMandatory(JComponent, boolean)} before. * The iteration starts at the given container. * * @param container the component tree root * * @see #setMandatory(JComponent, boolean) * @see #setMandatoryBackground(JTextComponent) */ public static void updateComponentTreeMandatoryAndBlankBackground(Container container) { visitComponentTree(container, null, new MandatoryAndBlankBackgroundVisitor()); }
/** * Traverses a component tree and sets mandatory borders * to text components that have been marked as mandatory * with {@link #setMandatory(JComponent, boolean)} before. * The iteration starts at the given container. * * @param container the component tree root * * @see #setMandatory(JComponent, boolean) * @see #setMandatoryBorder(JTextComponent) */ public static void updateComponentTreeMandatoryBorder(Container container) { visitComponentTree(container, null, new MandatoryBorderVisitor()); }
/** * Traverses a component tree and sets mandatory backgrounds * to text components that have been marked as mandatory * with {@link #setMandatory(JComponent, boolean)} before. * The iteration starts at the given container. * * @param container the component tree root * * @see #setMandatory(JComponent, boolean) * @see #setMandatoryBackground(JTextComponent) */ public static void updateComponentTreeMandatoryBackground(Container container) { visitComponentTree(container, null, new MandatoryBackgroundVisitor()); }
/** * Traverses a component tree and sets mandatory borders * to text components that have been marked as mandatory * with {@link #setMandatory(JComponent, boolean)} before. * The iteration starts at the given container. * * @param container the component tree root * * @see #setMandatory(JComponent, boolean) * @see #setMandatoryBorder(JTextComponent) */ public static void updateComponentTreeMandatoryBorder(Container container) { visitComponentTree(container, null, new MandatoryBorderVisitor()); }
/** * Traverses a component tree and sets mandatory backgrounds * to text components that have been marked as mandatory * with {@link #setMandatory(JComponent, boolean)} before. * The iteration starts at the given container. * * @param container the component tree root * * @see #setMandatory(JComponent, boolean) * @see #setMandatoryBackground(JTextComponent) */ public static void updateComponentTreeMandatoryBackground(Container container) { visitComponentTree(container, null, new MandatoryBackgroundVisitor()); }
/** * Traverses a component tree and sets mandatory backgrounds * to text components that have blank content and have been marked * as mandatory with {@link #setMandatory(JComponent, boolean)} before. * The iteration starts at the given container. * * @param container the component tree root * * @see #setMandatory(JComponent, boolean) * @see #setMandatoryBackground(JTextComponent) */ public static void updateComponentTreeMandatoryAndBlankBackground(Container container) { visitComponentTree(container, null, new MandatoryAndBlankBackgroundVisitor()); }
visitor.visit(component, keyMap); } else if (child instanceof Container) { visitComponentTree((Container) child, keyMap, visitor);
visitor.visit(component, keyMap); } else if (child instanceof Container) { visitComponentTree((Container) child, keyMap, visitor);
/** * Traverses a component tree and sets the severity for all text components. * The iteration starts at the given container. If a validation result is * associated with a component, the result's severity is set. Otherwise * the severity is set to {@code null}. The severity is set using * {@link #setSeverity(JComponent, Severity)}.<p> * * Before you use this method, associate components with validation * messages using {@link #setMessageKey(JComponent, Object)}. * * @param container the component tree root * @param result the validation result that provides the associated messages * * @see #setSeverity(JComponent, Severity) */ public static void updateComponentTreeSeverity(Container container, ValidationResult result) { visitComponentTree(container, result.keyMap(), new SeverityVisitor()); }
/** * Traverses a component tree and sets the severity for all text components. * The iteration starts at the given container. If a validation result is * associated with a component, the result's severity is set. Otherwise * the severity is set to {@code null}. The severity is set using * {@link #setSeverity(JComponent, Severity)}.<p> * * Before you use this method, associate components with validation * messages using {@link #setMessageKey(JComponent, Object)}. * * @param container the component tree root * @param result the validation result that provides the associated messages * * @see #setSeverity(JComponent, Severity) */ public static void updateComponentTreeSeverity(Container container, ValidationResult result) { visitComponentTree(container, result.keyMap(), new SeverityVisitor()); }
/** * Traverses a component tree and sets the text component backgrounds * according to the severity of an associated validation result - if any. * The iteration starts at the given container.<p> * * The message keys used to associate components with validation messages * should be set using {@link #setMessageKey(JComponent, Object)} before * you call this method. * * @param container the component tree root * @param result the validation result used to lookup the severities * * @see #setMandatory(JComponent, boolean) * @see #setMessageKey(JComponent, Object) * @see #setMandatoryBackground(JTextComponent) * @see #setErrorBackground(JTextComponent) * @see #setWarningBackground(JTextComponent) * * @since 1.0.2 */ public static void updateComponentTreeSeverityBackground( Container container, ValidationResult result) { visitComponentTree(container, result.keyMap(), new SeverityBackgroundVisitor()); }
/** * Traverses a component tree and sets the text component backgrounds * according to the severity of an associated validation result - if any. * The iteration starts at the given container.<p> * * The message keys used to associate components with validation messages * should be set using {@link #setMessageKey(JComponent, Object)} before * you call this method. * * @param container the component tree root * @param result the validation result used to lookup the severities * * @see #setMandatory(JComponent, boolean) * @see #setMessageKey(JComponent, Object) * @see #setMandatoryBackground(JTextComponent) * @see #setErrorBackground(JTextComponent) * @see #setWarningBackground(JTextComponent) * * @since 1.0.2 */ public static void updateComponentTreeSeverityBackground( Container container, ValidationResult result) { visitComponentTree(container, result.keyMap(), new SeverityBackgroundVisitor()); }