Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tool: More work to remove ControlsFx dependency
- Loading branch information
Showing
65 changed files
with
1,299 additions
and
697 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
.../src/main/java/com/speedment/plugins/enums/internal/newUi/CommaSeparatedStringEditor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,27 @@ | |||
package com.speedment.plugins.enums.internal.newUi; | |||
|
|||
import com.speedment.plugins.enums.StringToEnumTypeMapper; | |||
import com.speedment.tool.config.ColumnProperty; | |||
import com.speedment.tool.property.PropertyEditor; | |||
import java.util.stream.Stream; | |||
import javafx.beans.binding.Bindings; | |||
|
|||
/** | |||
* | |||
* @author Simon | |||
*/ | |||
public class CommaSeparatedStringEditor<T extends ColumnProperty> implements PropertyEditor<T>{ | |||
|
|||
@Override | |||
public Stream<Item> fieldsFor(T document) { | |||
return Stream.of( | |||
new AddRemoveStringItem( | |||
"Enum Constants", | |||
document.enumConstantsProperty(), | |||
document.getEnumConstants().orElse(null), | |||
"Used for defining what value the enum can take", | |||
Bindings.equal(document.typeMapperProperty(), StringToEnumTypeMapper.class.getName()) | |||
) | |||
); | |||
} | |||
} |
40 changes: 0 additions & 40 deletions
40
...c/main/java/com/speedment/plugins/enums/internal/ui/CommaSeparatedStringPropertyItem.java
This file was deleted.
Oops, something went wrong.
46 changes: 46 additions & 0 deletions
46
...reactor/src/main/java/com/speedment/plugins/reactor/internal/component/MergeOnEditor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,46 @@ | |||
/* | |||
* To change this license header, choose License Headers in Project Properties. | |||
* To change this template file, choose Tools | Templates | |||
* and open the template in the editor. | |||
*/ | |||
package com.speedment.plugins.reactor.internal.component; | |||
|
|||
import com.speedment.common.injector.annotation.Inject; | |||
import com.speedment.generator.component.TypeMapperComponent; | |||
import static com.speedment.plugins.reactor.internal.util.ReactorComponentUtil.validMergingColumns; | |||
import com.speedment.runtime.config.Column; | |||
import com.speedment.tool.config.TableProperty; | |||
import com.speedment.tool.property.PropertyEditor; | |||
import com.speedment.tool.property.item.ChoiceBoxItem; | |||
import static java.util.stream.Collectors.toList; | |||
import java.util.stream.Stream; | |||
import static javafx.collections.FXCollections.observableList; | |||
|
|||
/** | |||
* | |||
* @author Simon | |||
*/ | |||
class MergeOnEditor<T extends TableProperty> implements PropertyEditor<T>{ | |||
|
|||
private @Inject TypeMapperComponent typeMappers; | |||
|
|||
@Override | |||
public Stream<Item> fieldsFor(T document) { | |||
|
|||
return Stream.of( | |||
new ChoiceBoxItem<>( | |||
"Merge event on", | |||
document.stringPropertyOf(ReactorComponentImpl.MERGE_ON, () -> null), | |||
observableList( | |||
validMergingColumns(document, typeMappers) | |||
.stream() | |||
.map(Column::getJavaName) | |||
.collect(toList()) | |||
), | |||
"This column will be used to merge events in a " + | |||
"materialized object view (MOV) so that only the " + | |||
"most recent revision of an entity is visible." | |||
) | |||
); | |||
} | |||
} |
Oops, something went wrong.