-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ea2ecf5
commit fa56d16
Showing
26 changed files
with
483 additions
and
360 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
18 changes: 0 additions & 18 deletions
18
gui/src/main/java/com/repoachiever/exception/SmartGraphCssFileNotFoundException.java
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
gui/src/main/java/com/repoachiever/exception/SmartGraphPropertiesFileNotFoundException.java
This file was deleted.
Oops, something went wrong.
109 changes: 0 additions & 109 deletions
109
gui/src/main/java/com/repoachiever/service/element/graph/GraphVisualizer.java
This file was deleted.
Oops, something went wrong.
77 changes: 77 additions & 0 deletions
77
gui/src/main/java/com/repoachiever/service/element/image/view/common/ActiveImageView.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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
package com.repoachiever.service.element.image.view.common; | ||
|
||
import com.repoachiever.entity.PropertiesEntity; | ||
import com.repoachiever.exception.ApplicationImageFileNotFoundException; | ||
import com.repoachiever.service.element.common.ElementHelper; | ||
import com.repoachiever.service.element.image.collection.ConnectionStatusImageCollection; | ||
import com.repoachiever.service.element.storage.ElementStorage; | ||
import com.repoachiever.service.element.text.common.IElement; | ||
import com.repoachiever.service.element.text.common.IElementActualizable; | ||
import com.repoachiever.service.element.text.common.IElementResizable; | ||
import com.repoachiever.service.state.StateService; | ||
import javafx.application.Platform; | ||
import javafx.geometry.Pos; | ||
import javafx.scene.control.Button; | ||
import javafx.scene.control.SplitPane; | ||
import javafx.scene.control.Tooltip; | ||
import javafx.scene.image.Image; | ||
import javafx.scene.image.ImageView; | ||
import javafx.scene.layout.Background; | ||
import javafx.scene.layout.BorderPane; | ||
import javafx.scene.paint.Color; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Service; | ||
|
||
import java.io.InputStream; | ||
import java.util.Objects; | ||
import java.util.UUID; | ||
|
||
/** | ||
* Represents active image view. | ||
*/ | ||
public class ActiveImageView implements IElement<BorderPane> { | ||
private final UUID id = UUID.randomUUID(); | ||
|
||
public ActiveImageView(PropertiesEntity properties) throws ApplicationImageFileNotFoundException { | ||
Button button = new Button(); | ||
|
||
button.setDisable(true); | ||
|
||
InputStream imageSource = | ||
getClass().getClassLoader().getResourceAsStream(properties.getImageActiveName()); | ||
if (Objects.isNull(imageSource)) { | ||
throw new ApplicationImageFileNotFoundException(); | ||
} | ||
|
||
ImageView imageView = new ImageView(new Image(imageSource)); | ||
imageView.setFitHeight(properties.getImageBarHeight()); | ||
imageView.setFitWidth(properties.getImageBarWidth()); | ||
|
||
button.setGraphic(imageView); | ||
|
||
button.setAlignment(Pos.CENTER_RIGHT); | ||
|
||
SplitPane splitPane = new SplitPane(button); | ||
splitPane.setTooltip(new Tooltip(properties.getLabelActiveDescription())); | ||
|
||
splitPane.setBackground( | ||
Background.fill( | ||
Color.rgb( | ||
properties.getCommonSceneHeaderConnectionStatusBackgroundColorR(), | ||
properties.getCommonSceneHeaderConnectionStatusBackgroundColorG(), | ||
properties.getCommonSceneHeaderConnectionStatusBackgroundColorB()))); | ||
|
||
BorderPane borderPane = new BorderPane(); | ||
borderPane.setRight(splitPane); | ||
|
||
ElementStorage.setElement(id, borderPane); | ||
} | ||
|
||
/** | ||
* @see IElementActualizable | ||
*/ | ||
@Override | ||
public BorderPane getContent() { | ||
return ElementStorage.getElement(id); | ||
} | ||
} |
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
Oops, something went wrong.