-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Observable Preferences C (General) (#8047)
- Loading branch information
Showing
13 changed files
with
261 additions
and
148 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
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
29 changes: 25 additions & 4 deletions
29
src/main/java/org/jabref/logic/preferences/DOIPreferences.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 | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,40 @@ | ||
package org.jabref.logic.preferences; | ||
|
||
import javafx.beans.property.BooleanProperty; | ||
import javafx.beans.property.SimpleBooleanProperty; | ||
import javafx.beans.property.SimpleStringProperty; | ||
import javafx.beans.property.StringProperty; | ||
|
||
public class DOIPreferences { | ||
private final boolean useCustom; | ||
private final String defaultBaseURI; | ||
private BooleanProperty useCustom; | ||
private final StringProperty defaultBaseURI; | ||
|
||
public DOIPreferences(boolean useCustom, String defaultBaseURI) { | ||
this.useCustom = useCustom; | ||
this.defaultBaseURI = defaultBaseURI; | ||
this.useCustom = new SimpleBooleanProperty(useCustom); | ||
this.defaultBaseURI = new SimpleStringProperty(defaultBaseURI); | ||
} | ||
|
||
public boolean isUseCustom() { | ||
return useCustom.get(); | ||
} | ||
|
||
public BooleanProperty useCustomProperty() { | ||
return useCustom; | ||
} | ||
|
||
public void setUseCustom(boolean useCustom) { | ||
this.useCustom.set(useCustom); | ||
} | ||
|
||
public String getDefaultBaseURI() { | ||
return defaultBaseURI.get(); | ||
} | ||
|
||
public StringProperty defaultBaseURIProperty() { | ||
return defaultBaseURI; | ||
} | ||
|
||
public void setDefaultBaseURI(String defaultBaseURI) { | ||
this.defaultBaseURI.set(defaultBaseURI); | ||
} | ||
} |
41 changes: 35 additions & 6 deletions
41
src/main/java/org/jabref/logic/preferences/OwnerPreferences.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 | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,56 @@ | ||
package org.jabref.logic.preferences; | ||
|
||
import javafx.beans.property.BooleanProperty; | ||
import javafx.beans.property.SimpleBooleanProperty; | ||
import javafx.beans.property.SimpleStringProperty; | ||
import javafx.beans.property.StringProperty; | ||
|
||
public class OwnerPreferences { | ||
private final boolean useOwner; | ||
private final String defaultOwner; | ||
private final boolean overwriteOwner; | ||
private final BooleanProperty useOwner; | ||
private final StringProperty defaultOwner; | ||
private final BooleanProperty overwriteOwner; | ||
|
||
public OwnerPreferences(boolean useOwner, | ||
String defaultOwner, | ||
boolean overwriteOwner) { | ||
this.useOwner = useOwner; | ||
this.defaultOwner = defaultOwner; | ||
this.overwriteOwner = overwriteOwner; | ||
this.useOwner = new SimpleBooleanProperty(useOwner); | ||
this.defaultOwner = new SimpleStringProperty(defaultOwner); | ||
this.overwriteOwner = new SimpleBooleanProperty(overwriteOwner); | ||
} | ||
|
||
public boolean isUseOwner() { | ||
return useOwner.getValue(); | ||
} | ||
|
||
public BooleanProperty useOwnerProperty() { | ||
return useOwner; | ||
} | ||
|
||
public void setUseOwner(boolean useOwner) { | ||
this.useOwner.set(useOwner); | ||
} | ||
|
||
public String getDefaultOwner() { | ||
return defaultOwner.getValue(); | ||
} | ||
|
||
public StringProperty defaultOwnerProperty() { | ||
return defaultOwner; | ||
} | ||
|
||
public void setDefaultOwner(String defaultOwner) { | ||
this.defaultOwner.set(defaultOwner); | ||
} | ||
|
||
public boolean isOverwriteOwner() { | ||
return overwriteOwner.getValue(); | ||
} | ||
|
||
public BooleanProperty overwriteOwnerProperty() { | ||
return overwriteOwner; | ||
} | ||
|
||
public void setOverwriteOwner(boolean overwriteOwner) { | ||
this.overwriteOwner.set(overwriteOwner); | ||
} | ||
} |
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
Oops, something went wrong.