public final class SdkListModelBuilder
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
SdkListModelBuilder.ModelListener
Implement this listener to turn a given
SdkListModel
into a specific model and apply it for the control |
Constructor and Description |
---|
SdkListModelBuilder(Project project,
ProjectSdksModel sdkModel,
Condition<? super SdkTypeId> sdkTypeFilter,
Condition<? super SdkTypeId> sdkTypeCreationFilter,
Condition<? super Sdk> sdkFilter) |
Modifier and Type | Method and Description |
---|---|
void |
addModelListener(SdkListModelBuilder.ModelListener listener) |
SdkListItem.SdkReferenceItem |
addSdkReferenceItem(SdkType type,
java.lang.String name,
java.lang.String versionString,
boolean isValid) |
SdkListModel |
buildModel() |
void |
detectItems(javax.swing.JComponent parent,
Disposable lifetime) |
boolean |
executeAction(javax.swing.JComponent parent,
SdkListItem item,
Consumer<? super SdkListItem> afterExecution)
Executes an action that is associated with the given .
|
void |
processSelectedElement(javax.swing.JComponent parent,
SdkListItem item,
Consumer<? super SdkListItem> afterNewItemAdded,
Consumer<? super SdkListItem> onSelectableItem)
Executes an action that is associated with the given .
|
void |
reloadActions() |
void |
reloadSdks() |
void |
removeListener(SdkListModelBuilder.ModelListener listener) |
void |
removeSdkReferenceItem(SdkListItem.SdkReferenceItem item) |
SdkListItem |
showInvalidSdkItem(java.lang.String name) |
SdkListItem |
showNoneSdkItem() |
SdkListItem |
showProjectSdkItem() |
public void addModelListener(SdkListModelBuilder.ModelListener listener)
public void removeListener(SdkListModelBuilder.ModelListener listener)
public SdkListItem.SdkReferenceItem addSdkReferenceItem(SdkType type, java.lang.String name, java.lang.String versionString, boolean isValid)
public void removeSdkReferenceItem(SdkListItem.SdkReferenceItem item)
public SdkListModel buildModel()
public SdkListItem showProjectSdkItem()
public SdkListItem showNoneSdkItem()
public SdkListItem showInvalidSdkItem(java.lang.String name)
public void reloadSdks()
public boolean executeAction(javax.swing.JComponent parent, SdkListItem item, Consumer<? super SdkListItem> afterExecution)
false
,
the is NOT executed
syncModel()
is invoked. The implementation may not
execute the callback or and model update for any internal and
non-selectable itemstrue
if action was started and the
callback could happen later, false
otherwisepublic void processSelectedElement(javax.swing.JComponent parent, SdkListItem item, Consumer<? super SdkListItem> afterNewItemAdded, Consumer<? super SdkListItem> onSelectableItem)
syncModel()
is invoked. The implementation may not
execute the callback or and model update for any internal and
non-selectable itemspublic void reloadActions()
public void detectItems(javax.swing.JComponent parent, Disposable lifetime)