File: Toolbox.java

package info (click to toggle)
libswidgets-java 0.1.4-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny, squeeze
  • size: 356 kB
  • ctags: 667
  • sloc: java: 3,436; xml: 64; makefile: 11
file content (32 lines) | stat: -rw-r--r-- 721 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// $Id: Toolbox.java,v 1.1 2004/11/03 18:30:05 bobtarling Exp $

/*
 * Toolbox.java
 *
 * Created on 23 February 2003, 09:59
 */

package org.tigris.swidgets;

import java.awt.GridLayout;

/**
 * A toolbar where buttons are shown in a grid instead of a row.
 * @author  Bob Tarling
 */
public class Toolbox extends Toolbar {

    private int rows;
    private int cols;

    /** Creates a new instance of ToolBox
     * @param r the number of rows to display in the toolbox
     * @param c the number of columns to display in the toolbox
     */
    public Toolbox(int r, int c) {
        super();
        rows = r;
        cols = c;
        setLayout(new GridLayout(rows, cols));
    }
}