Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Analyst WebApp
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fidentis
Analyst WebApp
Commits
5b97e63a
There was an error fetching the commit references. Please try again later.
Commit
5b97e63a
authored
3 years ago
by
Matej Kovár
Browse files
Options
Downloads
Patches
Plain Diff
updated javadocs, added "remove primary face" method
parent
dc9ad153
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/src/main/java/cz/fidentis/analyst/gui/ProjectTopComp.form
+3
-0
3 additions, 0 deletions
...src/main/java/cz/fidentis/analyst/gui/ProjectTopComp.form
GUI/src/main/java/cz/fidentis/analyst/gui/ProjectTopComp.java
+25
-4
25 additions, 4 deletions
...src/main/java/cz/fidentis/analyst/gui/ProjectTopComp.java
with
28 additions
and
4 deletions
GUI/src/main/java/cz/fidentis/analyst/gui/ProjectTopComp.form
+
3
−
0
View file @
5b97e63a
...
@@ -181,6 +181,9 @@
...
@@ -181,6 +181,9 @@
<ResourceString
bundle=
"cz/fidentis/analyst/gui/Bundle.properties"
key=
"ProjectTopComp.removeButton1.text"
replaceFormat=
"org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"
/>
<ResourceString
bundle=
"cz/fidentis/analyst/gui/Bundle.properties"
key=
"ProjectTopComp.removeButton1.text"
replaceFormat=
"org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"
/>
</Property>
</Property>
</Properties>
</Properties>
<Events>
<EventHandler
event=
"mouseClicked"
listener=
"java.awt.event.MouseListener"
parameters=
"java.awt.event.MouseEvent"
handler=
"removeButton1MouseClicked"
/>
</Events>
<Constraints>
<Constraints>
<Constraint
layoutClass=
"org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"
value=
"org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"
>
<Constraint
layoutClass=
"org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"
value=
"org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"
>
<GridBagConstraints
gridX=
"1"
gridY=
"0"
gridWidth=
"1"
gridHeight=
"1"
fill=
"0"
ipadX=
"0"
ipadY=
"0"
insetsTop=
"16"
insetsLeft=
"22"
insetsBottom=
"13"
insetsRight=
"4"
anchor=
"18"
weightX=
"0.0"
weightY=
"0.0"
/>
<GridBagConstraints
gridX=
"1"
gridY=
"0"
gridWidth=
"1"
gridHeight=
"1"
fill=
"0"
ipadX=
"0"
ipadY=
"0"
insetsTop=
"16"
insetsLeft=
"22"
insetsBottom=
"13"
insetsRight=
"4"
anchor=
"18"
weightX=
"0.0"
weightY=
"0.0"
/>
...
...
This diff is collapsed.
Click to expand it.
GUI/src/main/java/cz/fidentis/analyst/gui/ProjectTopComp.java
+
25
−
4
View file @
5b97e63a
...
@@ -15,7 +15,6 @@ import cz.fidentis.analyst.face.HumanFace;
...
@@ -15,7 +15,6 @@ import cz.fidentis.analyst.face.HumanFace;
import
cz.fidentis.analyst.mesh.io.ModelFileFilter
;
import
cz.fidentis.analyst.mesh.io.ModelFileFilter
;
import
java.awt.Dimension
;
import
java.awt.Dimension
;
import
java.io.File
;
import
java.io.File
;
import
java.io.IOException
;
import
javax.swing.ImageIcon
;
import
javax.swing.ImageIcon
;
import
javax.swing.JFileChooser
;
import
javax.swing.JFileChooser
;
import
javax.swing.JOptionPane
;
import
javax.swing.JOptionPane
;
...
@@ -52,6 +51,9 @@ public final class ProjectTopComp extends TopComponent {
...
@@ -52,6 +51,9 @@ public final class ProjectTopComp extends TopComponent {
private
Project
project
;
private
Project
project
;
/**
* Creates new ProjectTopComp, initializes new project
*/
public
ProjectTopComp
()
{
public
ProjectTopComp
()
{
project
=
new
Project
();
project
=
new
Project
();
initComponents
();
initComponents
();
...
@@ -139,6 +141,11 @@ public final class ProjectTopComp extends TopComponent {
...
@@ -139,6 +141,11 @@ public final class ProjectTopComp extends TopComponent {
removeButton1
.
setFont
(
new
java
.
awt
.
Font
(
"Tahoma"
,
0
,
12
));
// NOI18N
removeButton1
.
setFont
(
new
java
.
awt
.
Font
(
"Tahoma"
,
0
,
12
));
// NOI18N
org
.
openide
.
awt
.
Mnemonics
.
setLocalizedText
(
removeButton1
,
org
.
openide
.
util
.
NbBundle
.
getMessage
(
ProjectTopComp
.
class
,
"ProjectTopComp.removeButton1.text"
));
// NOI18N
org
.
openide
.
awt
.
Mnemonics
.
setLocalizedText
(
removeButton1
,
org
.
openide
.
util
.
NbBundle
.
getMessage
(
ProjectTopComp
.
class
,
"ProjectTopComp.removeButton1.text"
));
// NOI18N
removeButton1
.
addMouseListener
(
new
java
.
awt
.
event
.
MouseAdapter
()
{
public
void
mouseClicked
(
java
.
awt
.
event
.
MouseEvent
evt
)
{
removeButton1MouseClicked
(
evt
);
}
});
gridBagConstraints
=
new
java
.
awt
.
GridBagConstraints
();
gridBagConstraints
=
new
java
.
awt
.
GridBagConstraints
();
gridBagConstraints
.
gridx
=
1
;
gridBagConstraints
.
gridx
=
1
;
gridBagConstraints
.
gridy
=
0
;
gridBagConstraints
.
gridy
=
0
;
...
@@ -213,11 +220,25 @@ public final class ProjectTopComp extends TopComponent {
...
@@ -213,11 +220,25 @@ public final class ProjectTopComp extends TopComponent {
add
(
jPanel1
,
java
.
awt
.
BorderLayout
.
CENTER
);
add
(
jPanel1
,
java
.
awt
.
BorderLayout
.
CENTER
);
}
// </editor-fold>//GEN-END:initComponents
}
// </editor-fold>//GEN-END:initComponents
/**
*
* @param evt starts function for loading model
*/
private
void
addButton1MouseClicked
(
java
.
awt
.
event
.
MouseEvent
evt
)
{
//GEN-FIRST:event_addButton1MouseClicked
private
void
addButton1MouseClicked
(
java
.
awt
.
event
.
MouseEvent
evt
)
{
//GEN-FIRST:event_addButton1MouseClicked
loadModel
();
loadModel
();
}
//GEN-LAST:event_addButton1MouseClicked
}
//GEN-LAST:event_addButton1MouseClicked
/**
* TEMP. behavior, remove button will be removing selected secondary face later
* @param evt Removes primary face
*/
private
void
removeButton1MouseClicked
(
java
.
awt
.
event
.
MouseEvent
evt
)
{
//GEN-FIRST:event_removeButton1MouseClicked
if
(
this
.
project
.
getPrimaryFace
()
!=
null
)
{
this
.
project
.
removePrimaryFace
();
jLabel1
.
setText
(
""
);
}
}
//GEN-LAST:event_removeButton1MouseClicked
// Variables declaration - do not modify//GEN-BEGIN:variables
// Variables declaration - do not modify//GEN-BEGIN:variables
private
javax
.
swing
.
JButton
addButton1
;
private
javax
.
swing
.
JButton
addButton1
;
private
javax
.
swing
.
JButton
analyzeButton1
;
private
javax
.
swing
.
JButton
analyzeButton1
;
...
@@ -297,8 +318,8 @@ public final class ProjectTopComp extends TopComponent {
...
@@ -297,8 +318,8 @@ public final class ProjectTopComp extends TopComponent {
HumanFace
loadedFace
;
HumanFace
loadedFace
;
loadedFace
=
new
HumanFace
(
new
File
(
file
.
getPath
()));
loadedFace
=
new
HumanFace
(
new
File
(
file
.
getPath
()));
this
.
project
.
setPrimaryFace
(
loadedFace
);
this
.
project
.
setPrimaryFace
(
loadedFace
);
jLabel1
.
setText
(
"Loaded"
);
jLabel1
.
setText
(
file
.
getName
()
);
}
catch
(
IO
Exception
e
)
{
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
e
.
getMessage
());
System
.
out
.
println
(
e
.
getMessage
());
JOptionPane
.
showMessageDialog
(
this
,
"File doesn't contain any model"
,
"Model is not loaded."
,
JOptionPane
.
showMessageDialog
(
this
,
"File doesn't contain any model"
,
"Model is not loaded."
,
0
,
new
ImageIcon
(
getClass
().
getResource
(
"/notLoadedModel.png"
)));
0
,
new
ImageIcon
(
getClass
().
getResource
(
"/notLoadedModel.png"
)));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment