Package org.patternfly.core
package org.patternfly.core
Core classes and interfaces for PatternFly Java.
This package provides the foundational building blocks used throughout PatternFly Java components and layouts. It includes utilities for ARIA attributes, data attributes, component context management, observable values, and common types.
Key Classes and Interfaces
ARIA and Data Attributes
Aria- Constants for ARIA attribute names (aria-label, aria-expanded, etc.)Attributes- Common HTML attribute constantsDataset- Constants for data-* attribute names used in PatternFly componentsRoles- Constants for ARIA role attribute valuesOuia- Open UI Automation (OUIA) data attribute constants for testing
Component Infrastructure
ComponentContext- Interface for storing and retrieving arbitrary values within a componentObservableValue- A value wrapper that notifies subscribers when changed, enabling reactive patternsAsyncStatus- Enumeration representing asynchronous operation states
Utilities
TupleandTuples- Simple key-value pair typesNumbers- Numeric utility functionsTimeouts- Common timeout constantsValidation- Validation helpers for property ranges and enumsLanguageDirection- Language direction enumeration (LTR/RTL)Version- Version information for the PatternFly Java library
Integration with Elemento
PatternFly Java builds upon Elemento's builder API, providing a fluent,
type-safe approach to creating web components. The ComponentContext interface extends Elemento's
TypedBuilder to provide consistent builder patterns across all PatternFly components.
Observable Values
The ObservableValue class enables reactive programming patterns by allowing components to
subscribe to value changes. Example usage:
ObservableValue<String> value = ObservableValue.ov("initial");
value.subscribe((current, previous) -> console.log("Value changed: " + current));
value.set("new value"); // Triggers subscriber notification
- See Also: