1554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe/* 2554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe * Copyright (C) 2015 The Android Open Source Project 3554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe * 4554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe * Licensed under the Apache License, Version 2.0 (the "License"); 5554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe * you may not use this file except in compliance with the License. 6554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe * You may obtain a copy of the License at 7554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe * 8554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe * http://www.apache.org/licenses/LICENSE-2.0 9554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe * 10554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe * Unless required by applicable law or agreed to in writing, software 11554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe * distributed under the License is distributed on an "AS IS" BASIS, 12554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe * See the License for the specific language governing permissions and 14554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe * limitations under the License. 15554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe */ 16554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe 17554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampepackage com.android.preload.actions; 18554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe 19554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampeimport com.android.preload.DumpTableModel; 20554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampeimport com.android.preload.Main; 21554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe 22554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampepublic class ComputeThresholdXAction extends ComputeThresholdAction { 23554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe 24554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe public ComputeThresholdXAction(String name, DumpTableModel dataTableModel, 25554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe String blacklist) { 26554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe super(name, dataTableModel, 1, blacklist); 27554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe } 28554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe 29554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe @Override 30554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe public void run() { 31554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe String value = Main.getUI().showInputDialog("Threshold?"); 32554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe 33554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe if (value != null) { 34554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe try { 35554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe threshold = Integer.parseInt(value); 36554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe super.run(); 37554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe } catch (Exception exc) { 38554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe } 39554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe } 40554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe } 41554d7ee0f5d177b6c0bce805f5a5917b6b211978Andreas Gampe}