]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - tim/prune/function/SetLineWidth.java
Version 19, May 2018
[GpsPrune.git] / tim / prune / function / SetLineWidth.java
diff --git a/tim/prune/function/SetLineWidth.java b/tim/prune/function/SetLineWidth.java
deleted file mode 100644 (file)
index feb49c2..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-package tim.prune.function;
-
-import tim.prune.App;
-import tim.prune.DataSubscriber;
-import tim.prune.UpdateMessageBroker;
-import tim.prune.config.Config;
-
-/**
- * Function to set the width with which lines are drawn
- */
-public class SetLineWidth extends SingleNumericParameterFunction
-{
-
-       /**
-        * Constructor
-        * @param inApp App object
-        */
-       public SetLineWidth(App inApp) {
-               super(inApp, 1, 4);
-       }
-
-       /** @return name key */
-       public String getNameKey() {
-               return "function.setlinewidth";
-       }
-
-       /** @return description key */
-       public String getDescriptionKey() {
-               return "dialog.setlinewidth.text";
-       }
-
-       /** @return the current value to display */
-       public int getCurrentParamValue() {
-               return Config.getConfigInt(Config.KEY_LINE_WIDTH);
-       }
-
-       /**
-        * Run function
-        */
-       public void begin()
-       {
-               // Not required, because this function is started from a ChooseSingleParameter function
-               // and goes directly to the completeFunction method.
-       }
-
-       /**
-        * Complete the function using the given line width parameter
-        */
-       public void completeFunction(int inLineWidth)
-       {
-               final int currLineWidth = Config.getConfigInt(Config.KEY_LINE_WIDTH);
-               if (inLineWidth >= 1 && inLineWidth <= 4 && inLineWidth != currLineWidth)
-               {
-                       Config.setConfigInt(Config.KEY_LINE_WIDTH, inLineWidth);
-                       UpdateMessageBroker.informSubscribers(DataSubscriber.SELECTION_CHANGED);
-               }
-       }
-}