@@ -333,7 +333,7 @@ private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS
333333
334334 stop ();
335335
336- JStock m = JStock .getInstance ();
336+ JStock m = JStock .instance ();
337337 m .setStatusBar (false , GUIBundle .getString ("IndicatorPanel_SimulationStopped" ));
338338 }//GEN-LAST:event_jButton6ActionPerformed
339339
@@ -403,7 +403,7 @@ private void jList1ValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN
403403 }//GEN-LAST:event_jList1ValueChanged
404404
405405 private void jButton4ActionPerformed (java .awt .event .ActionEvent evt ) {//GEN-FIRST:event_jButton4ActionPerformed
406- final JStock m = JStock .getInstance ();
406+ final JStock m = JStock .instance ();
407407 final IndicatorDefaultDrawing indicatorDefaultDrawing = (IndicatorDefaultDrawing )this .view .getDrawing ();
408408 final OperatorIndicator operatorIndicator = indicatorDefaultDrawing .getOperatorIndicator ();
409409
@@ -488,7 +488,7 @@ private boolean promptToSaveSignificantEdits(ListSelectionEx _listSelectionEx) {
488488 output = MessageFormat .format (MessagesBundle .getString ("question_message_current_drawing_is_modified_save_it_template" ), _listSelectionEx .projectName );
489489 }
490490 // We have a unsaved drawing. Prompt user to save it.
491- final int result = javax .swing .JOptionPane .showConfirmDialog (JStock .getInstance (), output , MessagesBundle .getString ("question_title_current_drawing_is_modified_save_it" ), javax .swing .JOptionPane .YES_NO_CANCEL_OPTION , javax .swing .JOptionPane .QUESTION_MESSAGE );
491+ final int result = javax .swing .JOptionPane .showConfirmDialog (JStock .instance (), output , MessagesBundle .getString ("question_title_current_drawing_is_modified_save_it" ), javax .swing .JOptionPane .YES_NO_CANCEL_OPTION , javax .swing .JOptionPane .QUESTION_MESSAGE );
492492
493493 if (result == JOptionPane .YES_OPTION ) {
494494 // Do not use this.Save(false). this.Save(false) will only save the
@@ -576,7 +576,7 @@ else if (this.jList2.getSelectedValue() != null) {
576576 output = MessageFormat .format (MessagesBundle .getString ("question_message_current_drawing_is_modified_save_it_template" ), this .jList2 .getSelectedValue ());
577577 }
578578 // We have a unsaved drawing. Prompt user to save it.
579- final int result = javax .swing .JOptionPane .showConfirmDialog (JStock .getInstance (), output , MessagesBundle .getString ("question_title_current_drawing_is_modified_save_it" ), javax .swing .JOptionPane .YES_NO_CANCEL_OPTION , javax .swing .JOptionPane .QUESTION_MESSAGE );
579+ final int result = javax .swing .JOptionPane .showConfirmDialog (JStock .instance (), output , MessagesBundle .getString ("question_title_current_drawing_is_modified_save_it" ), javax .swing .JOptionPane .YES_NO_CANCEL_OPTION , javax .swing .JOptionPane .QUESTION_MESSAGE );
580580 if (result == JOptionPane .YES_OPTION ) {
581581 // Do not use this.Save(false). this.Save(false) will only save the
582582 // project in current active tab and current selected project.
@@ -861,7 +861,7 @@ private void alertIndicatorDelete(boolean confirmationDialog) {
861861 }
862862 if (confirmationDialog ) {
863863 final String output = MessageFormat .format (MessagesBundle .getString ("question_message_delete_template" ), projectName );
864- final int result = javax .swing .JOptionPane .showConfirmDialog (JStock .getInstance (), output , MessagesBundle .getString ("question_title_delete" ), javax .swing .JOptionPane .YES_NO_OPTION , javax .swing .JOptionPane .QUESTION_MESSAGE );
864+ final int result = javax .swing .JOptionPane .showConfirmDialog (JStock .instance (), output , MessagesBundle .getString ("question_title_delete" ), javax .swing .JOptionPane .YES_NO_OPTION , javax .swing .JOptionPane .QUESTION_MESSAGE );
865865 if (result != javax .swing .JOptionPane .YES_OPTION ) {
866866 return ;
867867 }
@@ -881,7 +881,7 @@ private void moduleIndicatorDelete(boolean confirmationDialog) {
881881 }
882882 if (confirmationDialog ) {
883883 final String output = MessageFormat .format (MessagesBundle .getString ("question_message_delete_template" ), projectName );
884- final int result = javax .swing .JOptionPane .showConfirmDialog (JStock .getInstance (), output , MessagesBundle .getString ("question_title_delete" ), javax .swing .JOptionPane .YES_NO_OPTION , javax .swing .JOptionPane .QUESTION_MESSAGE );
884+ final int result = javax .swing .JOptionPane .showConfirmDialog (JStock .instance (), output , MessagesBundle .getString ("question_title_delete" ), javax .swing .JOptionPane .YES_NO_OPTION , javax .swing .JOptionPane .QUESTION_MESSAGE );
885885 if (result != javax .swing .JOptionPane .YES_OPTION ) {
886886 return ;
887887 }
@@ -1314,7 +1314,7 @@ private static Collection<Action> createSelectionActions(DrawingEditor editor) {
13141314 }
13151315
13161316 public void initAjaxProvider () {
1317- JStockOptions jStockOptions = JStock .getInstance ().getJStockOptions ();
1317+ JStockOptions jStockOptions = JStock .instance ().getJStockOptions ();
13181318
13191319 Country country = jStockOptions .getCountry ();
13201320
@@ -1357,7 +1357,7 @@ public void update(AutoCompleteJComboBox subject, MatchType matchType) {
13571357 addStockInfoFromAutoCompleteJComboBox (stockInfo );
13581358
13591359 // Remember to update our offline database as well.
1360- JStock .getInstance ().addUserDefinedStockInfo (stockInfo );
1360+ JStock .instance ().addUserDefinedStockInfo (stockInfo );
13611361 }
13621362 };
13631363 }
@@ -1377,7 +1377,7 @@ public void update(AutoCompleteJComboBox subject, ResultType resultType) {
13771377 addStockInfoFromAutoCompleteJComboBox (stockInfo );
13781378
13791379 // Remember to update our offline database as well.
1380- JStock .getInstance ().addUserDefinedStockInfo (stockInfo );
1380+ JStock .instance ().addUserDefinedStockInfo (stockInfo );
13811381 }
13821382 };
13831383 }
@@ -1407,7 +1407,7 @@ public Boolean doInBackground() {
14071407 Stock s = null ;
14081408 int tries = 0 ;
14091409
1410- JStock m = JStock .getInstance ();
1410+ JStock m = JStock .instance ();
14111411
14121412 if (m == null ) {
14131413 publish (s );
@@ -1459,7 +1459,7 @@ protected void process(java.util.List<Stock> stocks) {
14591459 return ;
14601460 }
14611461
1462- final JStock m = JStock .getInstance ();
1462+ final JStock m = JStock .instance ();
14631463
14641464 if (stock != null ) {
14651465 Stock new_stock = stock ;
@@ -1548,7 +1548,7 @@ private void createToolTipTextForJTabbedPane() {
15481548
15491549 // Run by worker thread only.
15501550 private void simulate (final Stock stock ) {
1551- JStock m = JStock .getInstance ();
1551+ JStock m = JStock .instance ();
15521552
15531553 // First, check whether there is a need to get history.
15541554 final IndicatorDefaultDrawing indicatorDefaultDrawing = (IndicatorDefaultDrawing )this .view .getDrawing ();
@@ -1777,7 +1777,7 @@ private IndicatorProjectManager getCurrentActiveIndicatorProjectManager() {
17771777 }
17781778
17791779 private Wizard getWizardDialog () {
1780- final JStock m = JStock .getInstance ();
1780+ final JStock m = JStock .instance ();
17811781 final Wizard wizard = new Wizard (m );
17821782 wizard .getDialog ().setTitle (java .util .ResourceBundle .getBundle ("org/yccheok/jstock/data/gui" ).getString ("IndicatorPanel_IndicatorInstallWizard" ));
17831783 wizard .getDialog ().setResizable (false );
0 commit comments