Permalink
Browse files

format code

  • Loading branch information...
1 parent 4eb672c commit 29d73300a9717660dc1983ba5ad7143ab0c4ebc6 Paul Russo committed Nov 20, 2016
Showing with 4,426 additions and 4,292 deletions.
  1. +72 −73 src/main/java/com/jchart/Jchart.java
  2. +2 −2 src/main/java/com/jchart/JchartFrameDestroyer.java
  3. +1 −1 src/main/java/com/jchart/JchartInitializer.java
  4. +29 −29 src/main/java/com/jchart/adapter/QuoteAdapter.java
  5. +83 −76 src/main/java/com/jchart/adapter/QuoteDataBean.java
  6. +1 −2 src/main/java/com/jchart/adapter/android/Orientation.java
  7. +2 −2 src/main/java/com/jchart/applet/AppletParamAccessor.java
  8. +193 −197 src/main/java/com/jchart/applet/JchartApplet.java
  9. +216 −219 src/main/java/com/jchart/io/IoJchartBase.java
  10. +2 −2 src/main/java/com/jchart/io/TickerListener.java
  11. +83 −80 src/main/java/com/jchart/io/TickerRequest.java
  12. +40 −39 src/main/java/com/jchart/io/factory/IoFactory.java
  13. +160 −160 src/main/java/com/jchart/io/factory/impl/IoFutures.java
  14. +118 −117 src/main/java/com/jchart/io/factory/impl/IoGoogleImpl.java
  15. +318 −321 src/main/java/com/jchart/io/factory/impl/IoJchartPsr.java
  16. +8 −7 src/main/java/com/jchart/io/factory/impl/IoJchartScreenWeb.java
  17. +22 −22 src/main/java/com/jchart/io/factory/impl/TickerConame.java
  18. +22 −18 src/main/java/com/jchart/livequote/LiveQuote.java
  19. +1 −2 src/main/java/com/jchart/livequote/LiveQuoteRequest.java
  20. +7 −6 src/main/java/com/jchart/livequote/LiveQuoteRequestFactory.java
  21. +23 −23 src/main/java/com/jchart/livequote/goog/GoogLiveQuoteRequest.java
  22. +44 −44 src/main/java/com/jchart/livequote/goog/GoogLiveQuoteSaxHandler.java
  23. +39 −38 src/main/java/com/jchart/livequote/yhoo/YhooLiveQuoteRequest.java
  24. +1 −1 src/main/java/com/jchart/model/ChangeRequest.java
  25. +264 −253 src/main/java/com/jchart/model/ChartOption.java
  26. +60 −47 src/main/java/com/jchart/model/ChartSizeModel.java
  27. +425 −422 src/main/java/com/jchart/model/ChartTypeModel.java
  28. +22 −20 src/main/java/com/jchart/model/ConameFactory.java
  29. +7 −3 src/main/java/com/jchart/model/Fpoint.java
  30. +5 −4 src/main/java/com/jchart/model/Frect.java
  31. +278 −281 src/main/java/com/jchart/model/InitParmParser.java
  32. +6 −5 src/main/java/com/jchart/model/Irect.java
  33. +59 −51 src/main/java/com/jchart/model/JchartComposite.java
  34. +87 −86 src/main/java/com/jchart/model/JchartModelFacade.java
  35. +226 −222 src/main/java/com/jchart/model/JchartRequest.java
  36. +23 −24 src/main/java/com/jchart/model/Kjchart.java
  37. +75 −61 src/main/java/com/jchart/model/Quote.java
  38. +35 −34 src/main/java/com/jchart/model/QuoteString.java
  39. +181 −169 src/main/java/com/jchart/model/TimeFrameModel.java
  40. +17 −18 src/main/java/com/jchart/model/color/ColorFactory.java
  41. +3 −3 src/main/java/com/jchart/model/indicator/DataValImpl.java
  42. +16 −17 src/main/java/com/jchart/model/indicator/Histogram.java
  43. +218 −217 src/main/java/com/jchart/model/indicator/IndicatorModel.java
  44. +55 −49 src/main/java/com/jchart/model/indicator/PsrMoneyFlow.java
  45. +103 −101 src/main/java/com/jchart/model/indicator/RelativeStrength.java
  46. +57 −58 src/main/java/com/jchart/model/indicator/Rsi.java
  47. +56 −54 src/main/java/com/jchart/stats/impl/Correlation.java
  48. +36 −37 src/main/java/com/jchart/stats/impl/Regression.java
  49. +21 −21 src/main/java/com/jchart/stats/impl/StandardDeviation.java
  50. +89 −71 src/main/java/com/jchart/stats/impl/StatsBean.java
  51. +13 −13 src/main/java/com/jchart/stats/impl/Zscore.java
  52. +33 −26 src/main/java/com/jchart/util/SleepThread.java
  53. +12 −7 src/main/java/com/jchart/view/client/ButtonBorderPanel.java
  54. +183 −180 src/main/java/com/jchart/view/client/DlgCompare.java
  55. +75 −80 src/main/java/com/jchart/view/client/DlgMA.java
  56. +16 −14 src/main/java/com/jchart/view/client/ExchangeChoice.java
  57. +42 −34 src/main/java/com/jchart/view/client/IndexChoice.java
  58. +32 −30 src/main/java/com/jchart/view/client/PnlStats.java
  59. +12 −7 src/main/java/com/jchart/view/client/TopBorderPanel.java
  60. +14 −14 src/main/java/com/jchart/view/client/factory/GuiFactory.java
  61. +13 −7 src/main/java/com/jchart/view/client/factory/PnlTopIntr.java
  62. +7 −5 src/main/java/com/jchart/view/client/factory/psr/PsrGuiFactory.java
  63. +63 −66 src/main/java/com/jchart/view/common/Graphport.java
@@ -10,84 +10,83 @@
import com.jchart.view.client.PnlJchart;
/**
- * Jchart - Financial Technical Analysis Software
- * Author: Paul Russo
- * Creation Date: Jan 8, 2000
- * Copyright &copy 2000,2016
+ * Jchart - Financial Technical Analysis Software Author: Paul Russo Creation
+ * Date: Jan 8, 2000 Copyright &copy 2000,2016
*/
public class Jchart implements TickerListener, JchartFrameDestroyer {
-
- private static PnlJchart _pnlJchartFloat;
- private FrmJchart _frmJchart;
- private JchartInitializer _jchartInitializer;
- protected JchartComposite _jchartComposite;
- //top level buttons
- //constructor
- public Jchart() {
- super();
- }
- //called first; called only if run as an application
- public static void main(String args[]) {
- Jchart jchart = new Jchart();
- jchart.init(args);
- }
-
- /**
- * if application then this is called by main()
- * if applet then this runs first
- */
- public void init(String args[]) {
- _jchartInitializer = new JchartInitializer();
- _jchartInitializer.init(args);
- _jchartComposite = _jchartInitializer.getJchartComposite();
- TickerRequest tickerRequest = new TickerRequest(_jchartComposite,this);
- String ticker = _jchartComposite.getJchartRequest().getTicker();
- _jchartComposite.getQuoteDataModel().setLiveQuote();
- tickerRequest.requestBlock("^GSPC");
- initPanel();
- }
+ private static PnlJchart _pnlJchartFloat;
+ private FrmJchart _frmJchart;
+ private JchartInitializer _jchartInitializer;
+ protected JchartComposite _jchartComposite;
- private void initPanel() {
- InitParmParser initParmParser = _jchartInitializer.getInitParmParser();
- _pnlJchartFloat = new PnlJchart();
- _pnlJchartFloat.setIsFloat(true);
- _pnlJchartFloat.setJchartComposite(_jchartComposite);
- _pnlJchartFloat.init(initParmParser.getTickerList());
- _frmJchart = new FrmJchart(_pnlJchartFloat, _jchartComposite, this);
- _frmJchart.setTickerDir(initParmParser.getTickerDir());
- _frmJchart.addNotify();
- _frmJchart.setVisible(true);
- }
+ // top level buttons
+ // constructor
+ public Jchart() {
+ super();
+ }
-
- public void destroyFrame() {
- //_frmJchart.dispose();
- _frmJchart = null;
- _pnlJchartFloat = null;
- _jchartInitializer.destroy();
- System.exit(0);
- }
-
- public void setTickerList(List<String> tickerList) {
- _pnlJchartFloat.setTickerList(tickerList);
- }
+ // called first; called only if run as an application
+ public static void main(String args[]) {
+ Jchart jchart = new Jchart();
+ jchart.init(args);
+ }
- public void setIsGetTicker(boolean b) {
- _frmJchart.setIsGetTicker(b);
- }
-
- public boolean isShowing() {
- return _pnlJchartFloat.isShowing();
- }
- public void updateYlabel(float f) {
- _pnlJchartFloat.updateYlabel(f);
- }
+ /**
+ * if application then this is called by main() if applet then this runs
+ * first
+ */
+ public void init(String args[]) {
+ _jchartInitializer = new JchartInitializer();
+ _jchartInitializer.init(args);
+ _jchartComposite = _jchartInitializer.getJchartComposite();
+ TickerRequest tickerRequest = new TickerRequest(_jchartComposite, this);
+ String ticker = _jchartComposite.getJchartRequest().getTicker();
+ _jchartComposite.getQuoteDataModel().setLiveQuote();
+ tickerRequest.requestBlock("^GSPC");
+ initPanel();
+ }
- public void requestComplete(boolean found) {
- if (_pnlJchartFloat == null) return;
- _pnlJchartFloat.requestComplete(found);
- _pnlJchartFloat.setFocus();
- }
-}
+ private void initPanel() {
+ InitParmParser initParmParser = _jchartInitializer.getInitParmParser();
+ _pnlJchartFloat = new PnlJchart();
+ _pnlJchartFloat.setIsFloat(true);
+ _pnlJchartFloat.setJchartComposite(_jchartComposite);
+ _pnlJchartFloat.init(initParmParser.getTickerList());
+ _frmJchart = new FrmJchart(_pnlJchartFloat, _jchartComposite, this);
+ _frmJchart.setTickerDir(initParmParser.getTickerDir());
+ _frmJchart.addNotify();
+ _frmJchart.setVisible(true);
+ }
+
+ public void destroyFrame() {
+ // _frmJchart.dispose();
+ _frmJchart = null;
+ _pnlJchartFloat = null;
+ _jchartInitializer.destroy();
+ System.exit(0);
+ }
+
+ public void setTickerList(List<String> tickerList) {
+ _pnlJchartFloat.setTickerList(tickerList);
+ }
+
+ public void setIsGetTicker(boolean b) {
+ _frmJchart.setIsGetTicker(b);
+ }
+ public boolean isShowing() {
+ return _pnlJchartFloat.isShowing();
+ }
+
+ public void updateYlabel(float f) {
+ _pnlJchartFloat.updateYlabel(f);
+ }
+
+ public void requestComplete(boolean found) {
+ if (_pnlJchartFloat == null)
+ return;
+ _pnlJchartFloat.requestComplete(found);
+ _pnlJchartFloat.setFocus();
+ }
+}
@@ -9,6 +9,6 @@
*/
public interface JchartFrameDestroyer {
- public void destroyFrame();
-
+ public void destroyFrame();
+
}
@@ -16,7 +16,7 @@
import com.jchart.view.client.factory.GuiFactory;
/**
- * Jchart - Financial Technical Analysis Software Author: Paul Russo
+ * Jchart - Financial Technical Analysis Software Author: Paul Russo
* CreationvDate: Jan 8, 2000
*/
public class JchartInitializer {
@@ -19,34 +19,34 @@
* @created Aug 19, 2007
*/
public class QuoteAdapter {
- private static SimpleDateFormat MMDDYY = new SimpleDateFormat( "MM/dd/yy" );
-
- public static Map<Date, Quote> getQuoteMap(List<Quote> quotes) {
- Map<Date, Quote> retval = new HashMap<Date, Quote>();
- for (Quote quoteDataBean : quotes) {
- retval.put(quoteDataBean.getDate(), quoteDataBean);
- }
- return retval;
- }
-
- public static Date getJchartDate(Date jchartDate) {
- Date date = null;
- String dateStr = FormatUtils.formatDate(jchartDate);
- try {
- date = MMDDYY.parse(dateStr);
- } catch (ParseException e) {
- e.printStackTrace();
- }
-
- return date;
- }
-
- public static Date[] getJchartDates(Date[] dates) {
- Date[] retval = new Date[dates.length];
- for (int i=0;i<dates.length;i++) {
- retval[i] = getJchartDate(dates[i]);
- }
- return retval;
- }
+ private static SimpleDateFormat MMDDYY = new SimpleDateFormat("MM/dd/yy");
+
+ public static Map<Date, Quote> getQuoteMap(List<Quote> quotes) {
+ Map<Date, Quote> retval = new HashMap<Date, Quote>();
+ for (Quote quoteDataBean : quotes) {
+ retval.put(quoteDataBean.getDate(), quoteDataBean);
+ }
+ return retval;
+ }
+
+ public static Date getJchartDate(Date jchartDate) {
+ Date date = null;
+ String dateStr = FormatUtils.formatDate(jchartDate);
+ try {
+ date = MMDDYY.parse(dateStr);
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+
+ return date;
+ }
+
+ public static Date[] getJchartDates(Date[] dates) {
+ Date[] retval = new Date[dates.length];
+ for (int i = 0; i < dates.length; i++) {
+ retval[i] = getJchartDate(dates[i]);
+ }
+ return retval;
+ }
}
Oops, something went wrong.

0 comments on commit 29d7330

Please sign in to comment.