Example usage for java.lang Short MAX_VALUE

List of usage examples for java.lang Short MAX_VALUE

Introduction

In this page you can find the example usage for java.lang Short MAX_VALUE.

Prototype

short MAX_VALUE

To view the source code for java.lang Short MAX_VALUE.

Click Source Link

Document

A constant holding the maximum value a short can have, 215-1.

Usage

From source file:GUI_Internalframes.StatistikAnzeige.java

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor./*  w ww.java  2 s . co  m*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    setClosable(true);
    setDefaultCloseOperation(javax.swing.WindowConstants.HIDE_ON_CLOSE);
    setTitle("Statistik");

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0,
            740, Short.MAX_VALUE));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 408,
            Short.MAX_VALUE));

    pack();
}

From source file:com.qwazr.externalizor.SimplePrimitive.java

public SimplePrimitive() {

    intValue = RandomUtils.nextInt();// w w  w. j  a va  2s.  c  o  m
    intArray = new int[] { RandomUtils.nextInt(), RandomUtils.nextInt(), RandomUtils.nextInt() };

    shortValue = (short) RandomUtils.nextInt(0, Short.MAX_VALUE);
    shortArray = new short[] { (short) RandomUtils.nextInt(0, Short.MAX_VALUE),
            (short) RandomUtils.nextInt(0, Short.MAX_VALUE), (short) RandomUtils.nextInt(0, Short.MAX_VALUE) };

    longValue = RandomUtils.nextLong();
    longArray = new long[] { RandomUtils.nextLong(), RandomUtils.nextLong(), RandomUtils.nextLong() };

    floatValue = RandomUtils.nextFloat();
    floatArray = new float[] { RandomUtils.nextFloat(), RandomUtils.nextFloat(), RandomUtils.nextFloat() };

    doubleValue = RandomUtils.nextDouble();
    doubleArray = new double[] { RandomUtils.nextDouble(), RandomUtils.nextDouble(), RandomUtils.nextDouble() };
    emptyDoubleArray = new double[0];

    booleanValue = RandomUtils.nextInt(0, 2) == 0;
    booleanArray = new boolean[RandomUtils.nextInt(0, 5)];
    for (int i = 0; i < booleanArray.length; i++)
        booleanArray[i] = RandomUtils.nextInt(0, 2) == 1;

    byteValue = (byte) RandomUtils.nextInt(0, Byte.MAX_VALUE);
    byteArray = new byte[] { (byte) RandomUtils.nextInt(0, Byte.MAX_VALUE),
            (byte) RandomUtils.nextInt(0, Byte.MAX_VALUE), (byte) RandomUtils.nextInt(0, Byte.MAX_VALUE) };

    charValue = (char) RandomUtils.nextInt(0, Character.MAX_VALUE);
    charArray = new char[] { (char) RandomUtils.nextInt(0, Character.MAX_VALUE),
            (char) RandomUtils.nextInt(0, Character.MAX_VALUE),
            (char) RandomUtils.nextInt(0, Character.MAX_VALUE) };

}

From source file:pe.egcc.app.demo.Demo02.java

/**
 * This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
 *///from w w  w.j  a  va  2 s  . co m
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    btnMostrar = new javax.swing.JButton();
    panelGrafico = new javax.swing.JPanel();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    btnMostrar.setText("Mostrar Grfico");
    btnMostrar.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnMostrarActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout panelGraficoLayout = new javax.swing.GroupLayout(panelGrafico);
    panelGrafico.setLayout(panelGraficoLayout);
    panelGraficoLayout.setHorizontalGroup(panelGraficoLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 503, Short.MAX_VALUE));
    panelGraficoLayout.setVerticalGroup(panelGraficoLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 350, Short.MAX_VALUE));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btnMostrar, javax.swing.GroupLayout.PREFERRED_SIZE, 130,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(panelGrafico, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(20, Short.MAX_VALUE)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                    .addComponent(btnMostrar, javax.swing.GroupLayout.PREFERRED_SIZE, 64,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18).addComponent(panelGrafico, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()));

    pack();
}

From source file:epsi.i5.frame.JFrame.java

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor./*from ww  w.j  a  v a2 s  .c  o  m*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    scrollPane1 = new java.awt.ScrollPane();
    jDialog1 = new javax.swing.JDialog();
    jFileChooser1 = new javax.swing.JFileChooser();

    javax.swing.GroupLayout jDialog1Layout = new javax.swing.GroupLayout(jDialog1.getContentPane());
    jDialog1.getContentPane().setLayout(jDialog1Layout);
    jDialog1Layout.setHorizontalGroup(jDialog1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 400, Short.MAX_VALUE));
    jDialog1Layout.setVerticalGroup(jDialog1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 300, Short.MAX_VALUE));

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    jFileChooser1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jFileChooser1ActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jFileChooser1, javax.swing.GroupLayout.PREFERRED_SIZE,
                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(
            jFileChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
            javax.swing.GroupLayout.PREFERRED_SIZE));

    pack();
}

From source file:cglabsample.ui.HistogramWindow.java

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.//from   w  ww .  j a v a 2  s.c o  m
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    setType(java.awt.Window.Type.POPUP);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0,
            400, Short.MAX_VALUE));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 300,
            Short.MAX_VALUE));

    pack();
}

From source file:lineage2.gameserver.network.clientpackets.RequestSellItem.java

/**
 * Method readImpl.//from www . ja  v  a 2  s  .c om
 */
@Override
protected void readImpl() {
    _listId = readD();
    _count = readD();
    if (((_count * 16) > _buf.remaining()) || (_count > Short.MAX_VALUE) || (_count < 1)) {
        _count = 0;
        return;
    }
    _items = new int[_count];
    _itemQ = new long[_count];
    for (int i = 0; i < _count; i++) {
        _items[i] = readD();
        readD();
        _itemQ[i] = readQ();
        if ((_itemQ[i] < 1) || (ArrayUtils.indexOf(_items, _items[i]) < i)) {
            _count = 0;
            break;
        }
    }
}

From source file:inout.ChartFrame.java

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.//w w  w . ja v a2 s.  co  m
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0,
            400, Short.MAX_VALUE));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 300,
            Short.MAX_VALUE));

    pack();
}

From source file:lineage2.gameserver.network.clientpackets.RequestExRefundItem.java

/**
 * Method readImpl./*from   w  ww. ja  va2  s. co m*/
 */
@Override
protected void readImpl() {
    _listId = readD();
    _count = readD();
    if (((_count * 4) > _buf.remaining()) || (_count > Short.MAX_VALUE) || (_count < 1)) {
        _count = 0;
        return;
    }
    _items = new int[_count];
    for (int i = 0; i < _count; i++) {
        _items[i] = readD();
        if (ArrayUtils.indexOf(_items, _items[i]) < i) {
            _count = 0;
            break;
        }
    }
}

From source file:iad.gui.HistogramDialog.java

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor./*from  w  w  w.  jav  a 2  s .co  m*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0,
            810, Short.MAX_VALUE));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 610,
            Short.MAX_VALUE));

    pack();
}

From source file:com.qwazr.externalizor.SimpleCollection.java

public SimpleCollection() {

    nullList = null;//from  w  w w  . j ava2  s . com
    stringList = new ArrayList<>();
    for (int i = 0; i < RandomUtils.nextInt(5, 50); i++)
        stringList.add(RandomStringUtils.randomAscii(8));

    nullSet = null;
    integerSet = new LinkedHashSet<>();
    for (int i = 0; i < RandomUtils.nextInt(5, 50); i++)
        integerSet.add(RandomUtils.nextInt());

    byteList = new Vector<>();
    for (int i = 0; i < RandomUtils.nextInt(5, 50); i++)
        byteList.add((byte) RandomUtils.nextInt(0, 128));

    nullMap = null;
    mapShortLong = new HashMap<>();
    for (int i = 0; i < RandomUtils.nextInt(5, 50); i++)
        mapShortLong.put((short) RandomUtils.nextInt(0, Short.MAX_VALUE), RandomUtils.nextLong());

}