Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
twi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Maria Barbatei
twi
Commits
9ae05d55
Commit
9ae05d55
authored
May 29, 2016
by
Aljoscha Niazi-Shahabi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TreeView abgeändert, BugFix in der Auswahl von mehrdeutigen Diagnosen
parent
8b2f60a1
Pipeline
#2920
skipped
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
26 deletions
+40
-26
Sandbox/TWI.gruppe2/src/main/java/uebung7/fin/gui/Uebung7GUI1.java
...WI.gruppe2/src/main/java/uebung7/fin/gui/Uebung7GUI1.java
+40
-26
No files found.
Sandbox/TWI.gruppe2/src/main/java/uebung7/fin/gui/Uebung7GUI1.java
View file @
9ae05d55
...
...
@@ -49,7 +49,7 @@ public class Uebung7GUI1 extends Application {
public
static
final
String
DIAGNOSEN_EXPORTIEREN
=
"Diagnosen als JSON exportieren"
;
public
static
final
String
HOCHGELADEN
=
" wurde hochgeladen."
;
public
static
final
String
FENSTER_TITEL
=
"Uebungsblatt 7 + 8"
;
public
static
final
String
GEFUNDENE_DIAGNOSE
=
"Gefundene Diagnose"
;
public
static
final
String
GEFUNDENE_DIAGNOSE
=
"Gefundene Diagnose
(n):
"
;
private
static
String
arztBriefName
=
""
;
private
static
HBox
topHBoxForUploadingArztBrief
=
null
;
public
static
boolean
diagnoseIsAnalyzed
=
false
;
...
...
@@ -58,7 +58,7 @@ public class Uebung7GUI1 extends Application {
private
static
TreeItem
<
String
>
root
=
new
TreeItem
<
String
>();
private
static
HBox
buttomHBox
=
null
;
private
static
VBox
leftVBox
=
null
;
static
TreeItem
<
String
>
tmp
_id
=
new
TreeItem
<
String
>();
static
TreeItem
<
String
>
tmp
TreeItem
=
new
TreeItem
<
String
>();
static
TreeItem
<
String
>
tmp_prop
=
new
TreeItem
<
String
>();
public
static
void
main
(
String
[]
args
)
{
...
...
@@ -149,13 +149,18 @@ public class Uebung7GUI1 extends Application {
dialog
.
setContentText
(
"Wählen Sie eine einzige Diagnose aus:"
);
Optional
<
String
>
result
=
dialog
.
showAndWait
();
//falls benutzer eine Diagnose ausgewahlt hat, wird der name der gewahlten diagnose
// zusammen mit der alphaID und den icdCode im treeview hinzugefugt
if
(
result
.
isPresent
())
{
System
.
out
.
println
(
"Ausgewählte Diagnose: "
+
result
.
get
());
for
(
int
i
=
1
;
i
<
diagnoseList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
diagnoseList
.
size
();
i
++)
{
if
(
result
.
get
().
equals
(
diagnoseList
.
get
(
i
).
getText
()))
{
// diagnose wird im treeview hinzugefugt
// diagnose wird im treeview hinzugefugt
populateTreeWithDiagnoses
(
diagnoseList
.
get
(
i
).
getText
(),
diagnoseList
.
get
(
i
).
getAlpha_id
(),
diagnoseList
.
get
(
i
).
getPrimary_key
());
...
...
@@ -263,6 +268,7 @@ public class Uebung7GUI1 extends Application {
comboBoxForArztbriefPath
.
setMaxWidth
(
WIDTH_BORDERPANE
*
0.6
);
comboBoxForArztbriefPath
.
setMinWidth
(
HEIGHT_BORDERPANE
*
0.6
);
comboBoxForArztbriefPath
.
setEditable
(
true
);
comboBoxForArztbriefPath
.
valueProperty
().
addListener
(
new
ChangeListener
<
String
>()
{
@Override
public
void
changed
(
ObservableValue
ov
,
String
t
,
String
t1
)
{
...
...
@@ -302,8 +308,9 @@ public class Uebung7GUI1 extends Application {
public
static
VBox
createLeftVBox
()
{
VBox
leftVBox
=
new
VBox
();
leftVBox
.
setPadding
(
standardDimensions
);
// Label foundDiagnose = new Label(GEFUNDENE_DIAGNOSE);
// leftVBox.getChildren().addAll(foundDiagnose, tree);
Label
foundDiagnose
=
new
Label
(
GEFUNDENE_DIAGNOSE
);
leftVBox
.
getChildren
().
addAll
(
foundDiagnose
,
tree
);
// leftVBox.getChildren().add(tree);
return
leftVBox
;
}
...
...
@@ -349,26 +356,34 @@ public class Uebung7GUI1 extends Application {
}
public
static
void
createTree
(
String
ID
)
{
/**
* Methode, welche die Diagnosen zum "root" Element hinzufügt
* @param title
* @param parent
*/
public
static
void
createTree
(
String
title
,
TreeItem
<
String
>
parent
)
{
// tmp beinhaltet immer die aktuelle ID zu der die Properties als
// Blätter hinzugefügt werden
tmp_id
=
makeBranch
(
ID
,
root
);
TreeItem
<
String
>
item
=
new
TreeItem
<>(
title
);
item
.
setExpanded
(
false
);
parent
.
getChildren
().
add
(
item
);
// tmpTreeItem speichert die aktuelle Diagnose,
//damit zu dieser die alphaId und der icdCode hinzugefügt werden können
tmpTreeItem
=
item
;
}
// public static void addToTree(String id) {
//
// makeBranch(id, tmp_id);
//
// }
// Create branches
static
public
TreeItem
<
String
>
makeBranch
(
String
title
,
TreeItem
<
String
>
parent
)
{
/**
* Methode, welche den Diagnosen im Baum die Blätter alphaId und icdCode hinzufügt.
* @param title
*/
public
static
void
makeBranch
(
String
title
)
{
TreeItem
<
String
>
item
=
new
TreeItem
<>(
title
);
item
.
setExpanded
(
false
);
parent
.
getChildren
().
add
(
item
);
return
item
;
tmpTreeItem
.
getChildren
().
add
(
item
);
}
/**
...
...
@@ -378,12 +393,11 @@ public class Uebung7GUI1 extends Application {
* @param icdCode
*/
public
static
void
populateTreeWithDiagnoses
(
String
diagnoseName
,
String
alphaId
,
String
icdCode
)
{
root
=
new
TreeItem
<
String
>(
diagnoseName
);
createTree
(
alphaId
);
createTree
(
icdCode
);
tree
=
new
TreeView
<
String
>(
root
);
leftVBox
.
getChildren
().
add
(
tree
);
createTree
(
diagnoseName
,
root
);
makeBranch
(
"Alpha-ID: "
+
alphaId
);
makeBranch
(
"ICD-Code: "
+
icdCode
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment