Modifier and Type | Method and Description |
---|---|
static void |
add(JComponent owner,
Object element)
Add the given element to the appropriate context for the given UI component.
|
static <B extends JComponent,V> |
bindBeanProperty(B bean,
String propertyName) |
static <B,V> Disposable |
bindBeanProperty(Context ctx,
B bean,
String propertyName) |
static void |
clear(JComponent owner)
Clear the context for the given UI component.
|
static int |
count(JComponent owner,
Class<?> match)
Count the elements matching the given class in the context for the given UI component.
|
static <T> Collection<T> |
findAll(Collection<? extends Object> args,
Class<T> clazz)
Find all elements matching the given class in the given collection.
|
static <T> Collection<T> |
findAll(JComponent owner,
Class<T> match)
Find all elements matching the given class in the context for the given UI component.
|
static <T> T |
findFirst(Collection<? extends Object> args,
Class<T> clazz)
Find the first element matching the given class in the given collection.
|
static <T> T |
findFirst(JComponent owner,
Class<T> match)
Find the first element matching the given class in the context for the given UI component.
|
static void |
remove(JComponent owner,
Object element)
Remove the given element from the appropriate context for the given UI component.
|
static boolean |
removeByClass(Context ctx,
Class<? extends Object> matchClass)
Remove all non-context elements matching the given class.
|
static <T> void |
removeByClass(JComponent owner,
Class<T> match)
Remove all elements matching the given class from the context for the given UI component.
|
static void |
replace(Context ctx,
Collection<? extends Object> c)
Replaces all non-Context entries in the current context objects collection with the elements of
the given collection.
|
static <T> void |
replace(Context ctx,
Collection<? extends T> c,
Class<T> matchClass)
Replaces all non-Context entries in the current context objects collection that match the given
class with the elements found in the given collection.
|
static <T> void |
replace(Context ctx,
T o,
Class<? super T> matchClass)
Replaces all non-Context entries in the current context objects collection that match the given
class with the given item.
|
static <T> void |
replace(JComponent owner,
Collection<? extends T> elements,
Class<T> match)
Replace all current elements matching the given class of the context for the given UI component
with the given collection of elements.
|
static void |
replace(JComponent owner,
Collection<Object> elements)
Replace the contents of context for the given UI component with the given collection of
elements.
|
static <T> void |
replace(JComponent owner,
T element,
Class<? super T> match)
Replace all current elements matching the given class of the context for the given UI component
with the given object.
|
public static void add(JComponent owner, Object element)
owner
- The JComponent
which has an associated
Context
element
- element to addIllegalArgumentException
- if no Context can be found for the given owner.public static void remove(JComponent owner, Object element)
owner
- The JComponent
which has an associated
Context
element
- element to removeIllegalArgumentException
- if no Context can be found for the given owner.public static void clear(JComponent owner)
owner
- The JComponent
which has an associated
Context
IllegalArgumentException
- if no Context can be found for the given owner.public static void replace(JComponent owner, Collection<Object> elements)
owner
- The JComponent
which has an associated
Context
elements
- elements to be swapped inIllegalArgumentException
- if no Context can be found for the given owner.public static <T> void replace(JComponent owner, Collection<? extends T> elements, Class<T> match)
owner
- The JComponent
which has an associated
Context
elements
- ?IllegalArgumentException
- if no Context can be found for the given owner.public static <T> void replace(JComponent owner, T element, Class<? super T> match)
owner
- The JComponent
which has an associated
Context
element
- ?IllegalArgumentException
- if no Context can be found for the given owner.public static <T> void removeByClass(JComponent owner, Class<T> match)
owner
- The JComponent
which has an associated
Context
match
- class to matchIllegalArgumentException
- if no Context can be found for the given owner.public static <T> T findFirst(JComponent owner, Class<T> match)
owner
- The JComponent
which has an associated
Context
match
- class to matchIllegalArgumentException
- if no Context can be found for the given owner.public static <T> Collection<T> findAll(JComponent owner, Class<T> match)
owner
- The JComponent
which has an associated
Context
match
- class to matchIllegalArgumentException
- if no Context can be found for the given owner.public static int count(JComponent owner, Class<?> match)
owner
- The JComponent
which has an associated
Context
match
- class to matchIllegalArgumentException
- if no Context can be found for the given owner.public static <T> T findFirst(Collection<? extends Object> args, Class<T> clazz)
args
- collection to search throughclazz
- type to matchIllegalArgumentException
- if no Context can be found for the given owner.public static <T> Collection<T> findAll(Collection<? extends Object> args, Class<T> clazz)
args
- collection to search throughclazz
- type to matchIllegalArgumentException
- if no Context can be found for the given owner.public static boolean removeByClass(Context ctx, Class<? extends Object> matchClass)
matchClass
- Only elements of this class will be replacedpublic static void replace(Context ctx, Collection<? extends Object> c)
ctx
- ?c
- The new collection of context objects.public static <T> void replace(Context ctx, Collection<? extends T> c, Class<T> matchClass)
ctx
- ?c
- The new collection (ideally containing only objects of the given class, since only
these objects will be replaced. Elements belonging to other classes will be ignored.)matchClass
- Only elements of this class will be replacedpublic static <T> void replace(Context ctx, T o, Class<? super T> matchClass)
ctx
- ?o
- The new item (ideally being derived from the given class, since only these objects
will be replaced. Elements belonging to other classes will be ignored.)matchClass
- Only elements of this class will be replacedpublic static <B extends JComponent,V> Disposable bindBeanProperty(B bean, String propertyName)
public static <B,V> Disposable bindBeanProperty(Context ctx, B bean, String propertyName)
Copyright © 2024 levigo holding gmbh. All rights reserved.