Dobry den,

balik, ktory Vam chyba, si najdite na Internete. Pri
kompilacii musite najdene baliky umiestnit do
classpath. 
Napriklad triedy
- junit.framework.Assert;
- junit.framework.AssertionFailedError;
najdete v junit.jar
(http://sourceforge.net/project/showfiles.php?group_id=15278).
Package org.uispec4j nepoznam. Jednoducho si
zagooglujte. 

S pozdravom
Radovana Straube

--- hans peter geerdes <[EMAIL PROTECTED]> wrote:

> Dobrý den,
> mìl problém o hlednì nìjakého zdrojového kudu.dej me
> to mu ¾e jsem jsi sehnal zdroják,ale v nìm je
> obsa¾ený balík a já nevím co s ním bez nìho mi to
> nefunguje.Prostì v¹echy ostaní balímy mimo javadoc
> java Lang.Dìkuji
> 
> Zde pøíkládám jeden z pøíkladu,ale tìch src mám vic:
> import junit.framework.Assert;
> import junit.framework.AssertionFailedError;
> import org.uispec4j.assertion.Assertion;
> import org.uispec4j.utils.ArrayUtils;
> import org.uispec4j.utils.ColorUtils;
> 
> import javax.swing.*;
> import javax.swing.border.Border;
> import javax.swing.table.JTableHeader;
> import javax.swing.table.TableCellRenderer;
> import javax.swing.table.TableColumn;
> import javax.swing.table.TableModel;
> import java.awt.*;
> import java.util.Arrays;
> import java.util.HashMap;
> import java.util.Map;
> 
> /**
> * Wrapper for JTable components.<p/>
> * The contents of the underlying table can be
> usually checked with String or Boolean values,
> * as in the following example:
> * <pre><code>
> * assertTrue(table.contentEquals(new String[]{
> * {"Bart", "Simpson"},
> * {"Marge", "Simpson"}
> * }));
> * </code></pre>
> * The conversion between the values (Strings) given
> in the test and the values
> * actually displayed by the table renderer is
> performed by a dedicated 
> * [EMAIL PROTECTED] TableCellValueConverter}, which retrieves
> the graphical component that draws
> * the table cells and determines the displayed value
> accordingly.
> * A [EMAIL PROTECTED] DefaultTableCellValueConverter} is used
> by default by the Table component.
> */
> public class Table extends AbstractUIComponent {
> public static final String TYPE_NAME = "table";
> public static final Class[] SWING_CLASSES =
> {JTable.class};
> 
> private JTable jTable;
> private Header header = new Header();
> private TableCellValueConverter
> defaultCellValueConverter = new
> DefaultTableCellValueConverter();
> private Map cellValuesConvertersByColumn = new
> HashMap();
> 
> public Table(JTable table) {
> this.jTable = table;
> }
> 
> public String getDescriptionTypeName() {
> return TYPE_NAME;
> }
> 
> public Component getAwtComponent() {
> return jTable;
> }
> 
> public JTable getJTable() {
> return jTable;
> }
> 
> /**
> * Returns a helper interface which gives access to
> the table header.
> */
> public Header getHeader() {
> return header;
> }
> 
> /**
> * Sets a new converter for analyzing the table cells
> content.
> */
> public void
> setDefaultCellValueConverter(TableCellValueConverter
> cellValueConverter) {
> this.defaultCellValueConverter = cellValueConverter;
> }
> 
> /**
> * Sets a new converter for analyzing the cells of a
> given column.
> */
> public void setCellValueConverter(int column,
> TableCellValueConverter tableCellValueConverter) {
> cellValuesConvertersByColumn.put(new
> Integer(column), tableCellValueConverter);
> }
> 
> public void click(int row, int column) {
> click(row, column, Key.Modifier.NONE);
> }
> 
> public void click(int row, int column, Key.Modifier
> modifier) {
> Rectangle rect = jTable.getCellRect(row, column,
> false);
> Mouse.doClickInRectangle(this, rect, false,
> modifier);
> }
> 
> public void rightClick(int row, int column) {
> Rectangle rect = jTable.getCellRect(row, column,
> false);
> Mouse.doClickInRectangle(this, rect, true,
> Key.Modifier.NONE);
> }
> 
> public void doubleClick(int row, int column) {
> Rectangle rect = jTable.getCellRect(row, column,
> false);
> Mouse.doClickInRectangle(this, rect, false,
> Key.Modifier.NONE);
> Mouse.doDoubleClickInRectangle(this, rect);
> }
> 
> public Trigger triggerClick(final int row, final int
> column, final Key.Modifier modifier) {
> return new Trigger() {
> public void run() throws Exception {
> click(row, column, modifier);
> }
> };
> }
> 
> public Trigger triggerRightClick(final int row,
> final int column) {
> return new Trigger() {
> public void run() throws Exception {
> rightClick(row, column);
> }
> };
> }
> 
> public Trigger triggerDoubleClick(final int row,
> final int column) {
> return new Trigger() {
> public void run() throws Exception {
> doubleClick(row, column);
> }
> };
> }
> 
> public int getRowCount() {
> return jTable.getRowCount();
> }
> 
> public int getColumnCount() {
> return jTable.getColumnCount();
> }
> 
> /**
> * Returns the object (String or Boolean) displayed
> in a given cell.<p/>
> * The returned object is that returned by the
> current TableCellValueConverter
> * used by the table.
> * @see #setCellValueConverter(int,
> TableCellValueConverter)
> * @see
>
#setDefaultCellValueConverter(TableCellValueConverter)
> */
> public Object getContentAt(int row, int column) {
> return getValueAt(row, column);
> }
> 
> /**
> * Returns a [EMAIL PROTECTED] Cell} object for interacting with
> the content of an individual table cell.<p/>
> * Sample usage:
> * <pre><code>
> * ComboBox comboBox = table.editCell(0,
> 0).getComboBox();
> * assertTrue(comboBox.contentEquals(choices));
> * comboBox.select("b");
> * </code></pre>
> */
> public Cell editCell(int row, int column) {
> Assert.assertTrue("Cell (" + row + "," + column + ")
> is not editable", 
> jTable.isCellEditable(row, column));
> Component cellEditor =
> getSwingEditorComponentAt(row, column);
> JPanel cellPanel = new JPanel();
> cellPanel.add(cellEditor);
> return new Cell(cellPanel);
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Odpovedet emailem