List of usage examples for java.lang Integer Integer
@Deprecated(since = "9") public Integer(String s) throws NumberFormatException
From source file:Main.java
/** * convert charters [beginCol, endCol] of the input string to an int. Return 0 if empty. * /*ww w . ja va2s . c o m*/ * @param str input string * @param beginCol begin column, starts from 1 ... * @param endCol end column * @return the number */ public static int getInt(String str, int beginCol, int endCol) { if (str.length() < endCol) return 0; String s = str.substring(beginCol - 1, endCol); if (s.trim().equals("")) return 0; else return new Integer(s.trim()).intValue(); }
From source file:Main.java
public ShowAction() { super("About"); putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_A)); putValue(Action.NAME, "Go to number "); putValue(Action.SHORT_DESCRIPTION, "Change the number to "); super.setEnabled(false); }
From source file:Main.java
public ShowAction() { super("About"); putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_A)); putValue(Action.NAME, "Go to number "); putValue(Action.SHORT_DESCRIPTION, "Change the number to "); }
From source file:Main.java
public ShowAction() { super("About"); putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_A)); putValue(Action.NAME, "Go to number "); putValue(Action.SHORT_DESCRIPTION, "Change the number to "); super.setEnabled(false); System.out.println(super.isEnabled()); }
From source file:Main.java
public ShowAction() { super("About"); putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_A)); putValue(Action.NAME, "Go to number "); putValue(Action.LONG_DESCRIPTION, "Change the number to "); super.setEnabled(false); System.out.println(super.isEnabled()); }
From source file:Main.java
public ShowAction() { super("About"); putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_A)); putValue(Action.NAME, "Go to number "); putValue(Action.LONG_DESCRIPTION, "Change the number to "); System.out.println(super.getValue(Action.NAME)); }
From source file:FieldModification.java
/** * Sets all int fields in an object to 0. * * @param obj The object to operate on./*from ww w .j av a 2s .c o m*/ * * @throws RuntimeException If there is a reflection problem. */ public static void initPublicIntFields2(final Object obj) { try { final Integer value = new Integer(0); Field[] fields = obj.getClass().getFields(); for (int idx = 0; idx < fields.length; idx++) { if (fields[idx].getType() == int.class) { fields[idx].set(obj, value); } } } catch (final IllegalAccessException ex) { throw new RuntimeException(ex); } }
From source file:Main.java
public ShowAction() { super("About"); putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_A)); putValue(Action.NAME, "Go to number "); putValue(Action.SELECTED_KEY, true); }
From source file:Util.java
public static void getComponentTreePosition(Component c, ArrayList pos) { if (c.getParent() == null) { return;// w ww . java2 s .c om } getComponentTreePosition(c.getParent(), pos); pos.add(new Integer(c.getParent().getComponentCount() - getComponentIndex(c))); }
From source file:Main.java
public ShowAction() { super("About"); putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_A)); putValue(Action.SMALL_ICON, MetalIconFactory.getFileChooserHomeFolderIcon()); }