X-Git-Url: http://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Ffunction%2FSetLineWidth.java;fp=tim%2Fprune%2Ffunction%2FSetLineWidth.java;h=0000000000000000000000000000000000000000;hp=feb49c24958855a1f40c253703cf9f0827e07de0;hb=92dad5df664287acb51728e9ea599f150765d34a;hpb=81843c3d8d0771bf00d0f26034a13aa515465c78 diff --git a/tim/prune/function/SetLineWidth.java b/tim/prune/function/SetLineWidth.java deleted file mode 100644 index feb49c2..0000000 --- a/tim/prune/function/SetLineWidth.java +++ /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); - } - } -}