"Fossies" - the Fresh Open Source Software Archive

Member "tesseract-ocr/doc/html/_s_v_menu_item_8java_source.html" (26 Oct 2012, 13109 Bytes) of package /linux/misc/old/tesseract-ocr-3.02.02-doc-html.tar.gz:


Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. You can here alternatively try to browse the pure source code or just view or download the uninterpreted raw source code. If the rendering is insufficient you may try to find and view the page on the tesseract-ocr-3.02.02-doc-html.tar.gz project site itself.

Tesseract  3.02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SVMenuItem.java
Go to the documentation of this file.
1 // Copyright 2007 Google Inc. All Rights Reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); You may not
4 // use this file except in compliance with the License. You may obtain a copy of
5 // the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
6 // applicable law or agreed to in writing, software distributed under the
7 // License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
8 // OF ANY KIND, either express or implied. See the License for the specific
9 // language governing permissions and limitations under the License.
10 
11 package com.google.scrollview.ui;
12 
22 import com.google.scrollview.events.SVEventType;
23 
24 import javax.swing.JMenuItem;
25 
31 class SVMenuItem extends SVAbstractMenuItem {
32  public String value = null;
33  public String desc = null;
34 
35  SVMenuItem(int id, String name, String v, String d) {
36  super(id, name, new JMenuItem(name));
37  value = v;
38  desc = d;
39  }
40 
46  @Override
47  public void performAction(SVWindow window, SVEventType eventType) {
48  if (desc != null) {
49  window.showInputDialog(desc, value, id, eventType);
50  } else {
51  window.showInputDialog(name, value, id, eventType);
52  }
53  }
54 
56  @Override
57  public String getValue() {
58  return value;
59  }
60 }
61