Skip to content

Commit

Permalink
#27 Calculator: add trigonometric functions
Browse files Browse the repository at this point in the history
  • Loading branch information
greipadmin committed Apr 5, 2019
1 parent 3b44181 commit cd07966
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
25 changes: 23 additions & 2 deletions org.greip/src/org/greip/calculator/Calculator.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ public static void execute(final Event e, final Calculator calculator) {
private final boolean simple;

/**
* Constructs a new instance of this class given its parent.
* Constructs a new instance of this class given its parent. SWT.SIMPLE is
* used as default style.
*
* @param parent
* a composite control which will be the parent of the new instance
Expand All @@ -115,9 +116,29 @@ public static void execute(final Event e, final Calculator calculator) {
* </ul>
*/
public Calculator(final Composite parent) {
this(parent, SWT.NONE);
this(parent, SWT.SIMPLE);
}

/**
* Constructs a new instance of this class given its parent.
* <dl>
* <dt><b>Styles:</b></dt>
* <dd>SIMPLE - Simple mode without functions and constants</dd>
* <dd>ALL - Advanced mode with all features</dd>
* </dl>
*
* @param parent
* a composite control which will be the parent of the new instance
* (cannot be null)
* @param style
* the style of widget to construct
*
* @exception SWTException
* <ul>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread
* that created the parent</li>
* </ul>
*/
public Calculator(final Composite parent, final int style) {
super(parent, SWT.NONE);

Expand Down
2 changes: 1 addition & 1 deletion org.greip/src/org/greip/color/ColorHistoryList.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

class ColorHistoryList {

private static final String PREFERENCE_NODE = ColorHistory.class.getPackage().getName();
private static final String PREFERENCE_NODE = ColorHistoryList.class.getPackage().getName();
private static final Preferences preferences = InstanceScope.INSTANCE.getNode(PREFERENCE_NODE);

static ColorHistoryList INSTANCE = new ColorHistoryList();
Expand Down

0 comments on commit cd07966

Please sign in to comment.