Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
* 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 cz.fidentis.analyst.gui;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JLabel;
import org.openide.awt.ActionID;
import org.openide.awt.ActionReference;
import org.openide.awt.ActionReferences;
import org.openide.awt.ActionRegistration;
import org.openide.util.NbBundle.Messages;
@ActionID(
category = "Edit",
id = "cz.fidentis.analyst.gui.Wireframe"
)
@ActionRegistration(
iconBase = "wireframe16x16.png",
displayName = "#CTL_Wireframe"
)
@ActionReferences({
@ActionReference(path = "Menu/Edit", position = 2600, separatorBefore = 2550),
@ActionReference(path = "Toolbars/File", position = 300)
})
@Messages("CTL_Wireframe=Wireframe")
public final class Wireframe implements ActionListener {
/**
* Flag for whether model should be displayed as wire-frame
*/
boolean wiredModelClicked = false;
@Override
public void actionPerformed(ActionEvent e) {
if (wiredModelClicked) {
//resetLabelBackround(wiredModelButton);
wiredModelClicked = false;
Canvas.setDrawWired(wiredModelClicked);
/*canvasSymmetryPanel.setDrawWired(wiredModelClicked);
canvasModelView.setDrawWired(wiredModelClicked);*/
} else {
//setLabelBackround(wiredModelButton);
wiredModelClicked = true;
Canvas.setDrawWired(wiredModelClicked);
/*canvasSymmetryPanel.setDrawWired(wiredModelClicked);
canvasModelView.setDrawWired(wiredModelClicked);*/
}
}
/**
* Changes backround of labels to darker green color
* @param jl label of which backround changes
*/
private void setLabelBackround(JLabel jl) {
jl.setBackground(new Color(11,56,49));
}
/**
* Changes backround of the label back to original
* @param jl label of which backround is return to original
*/
private void resetLabelBackround(JLabel jl) {
jl.setBackground(new Color(20,114,105));
}
}