@@ -47,7 +47,7 @@ public void desordenarArray() {
47
47
Sorts .n [i ] = Sorts .n [swapWidthIndex ];
48
48
Sorts .n [swapWidthIndex ] = temp ;
49
49
Delay .delay (1 );
50
- Main .getPanelBarras () .repaint ();
50
+ Main .panelBarras .repaint ();
51
51
}
52
52
}
53
53
@@ -60,7 +60,7 @@ public void desordenarArray() {
60
60
public void paintComponent (Graphics g ) {
61
61
Graphics2D graphics = (Graphics2D ) g ;
62
62
super .paintComponent (graphics );
63
- int opcionGrafico = Main .getComboboxtiposgraficos () .getSelectedIndex ();
63
+ int opcionGrafico = Main .comboBoxTiposGraficos .getSelectedIndex ();
64
64
configEstilo (opcionGrafico , graphics );
65
65
66
66
for (int i = 0 ; i < NUM_BARS ; i ++) {
@@ -91,12 +91,12 @@ else if (anterioresMismo >= i)
91
91
*/
92
92
public Vector <EstiloGrafico > almacenarEstilos () {
93
93
Vector <EstiloGrafico > estilos = new Vector <EstiloGrafico >();
94
- estilos .add (estiloGrafico = new Columnas ());
95
- estilos .add (estiloGrafico = new Piramide ());
96
- estilos .add (estiloGrafico = new Pixel ());
97
- estilos .add (estiloGrafico = new Circulo ());
98
- estilos .add (estiloGrafico = new Circunferencia ());
99
- estilos .add (estiloGrafico = new Espital ());
94
+ estilos .add (new Columnas ());
95
+ estilos .add (new Piramide ());
96
+ estilos .add (new Pixel ());
97
+ estilos .add (new Circulo ());
98
+ estilos .add (new Circunferencia ());
99
+ estilos .add (new Espital ());
100
100
return estilos ;
101
101
}
102
102
@@ -107,17 +107,15 @@ public Vector<EstiloGrafico> almacenarEstilos() {
107
107
* @param graphics the graphics
108
108
*/
109
109
private void configEstilo (int opcionGrafico , Graphics2D graphics ) {
110
- Vector <EstiloGrafico > estilos = almacenarEstilos ();
111
110
// Cambio la cantidad de elementos que se pintan en pantalla.
112
111
// Simepre que sean Objetos Transfomaciones tendran multicolor.
113
- if (estilos .get (opcionGrafico ) instanceof Transfomaciones ) {
112
+ if (almacenarEstilos () .get (opcionGrafico ) instanceof Transfomaciones ) {
114
113
graphics .translate (translateX , translateY );
115
- Main .getSliderTamBarras () .setMinimum (6 );
114
+ Main .sliderTamBarras .setMinimum (6 );
116
115
activarMulticolor = true ;
117
116
Main .tglbtnMulticolor .setSelected (activarMulticolor );
118
117
} else {
119
- Main .getSliderTamBarras ().setMinimum (1 );
120
-
118
+ Main .sliderTamBarras .setMinimum (1 );
121
119
}
122
120
}
123
121
@@ -171,28 +169,4 @@ protected GradientPaint getGradientPaint(int position, int value, int columnWidt
171
169
public Dimension getPreferredSize () {
172
170
return new Dimension (WIN_WIDTH , WIN_HEIGHT );
173
171
}
174
-
175
- public static int getWinWidth () {
176
- return WIN_WIDTH ;
177
- }
178
-
179
- public static int getWinHeight () {
180
- return WIN_HEIGHT ;
181
- }
182
-
183
- public static int getNUM_BARS () {
184
- return NUM_BARS ;
185
- }
186
-
187
- public static void setNUM_BARS (int nUM_BARS ) {
188
- NUM_BARS = nUM_BARS ;
189
- }
190
-
191
- public static void setBAR_WIDTH (int bAR_WIDTH ) {
192
- BAR_WIDTH = bAR_WIDTH ;
193
- }
194
-
195
- public static void setBAR_HEIGHT (int bAR_HEIGHT ) {
196
- BAR_HEIGHT = bAR_HEIGHT ;
197
- }
198
172
}
0 commit comments