public void initializeTable() throws KExceptionClass {

    // set the SQL
    super.initializeSQLQuery(

        // 1 campos
        " ID, TIPE, NAMA, UNIT ",

        // 2 tablas and joins
        " v_select_brngkelbakudtl vb",

        // 3 llave principal (mayusculas!)
        "ID");

    // define column settings
    setColumnNames("vb", "ID", "ID");
    setColumnNames("vb", "TIPE", "Tipe");
    setColumnNames("vb", "NAMA", "Nama");
    setColumnNames("vb", "UNIT", "Unit");

    // load data
    super.initializeTable();

    adjustColumnWidth("Nama", 500);
  }
Пример #2
0
  public void initializeTable() throws KExceptionClass {

    // set the SQL
    super.initializeSQLQuery(

        // 1 campos
        " ID , NAMA ",

        // 2 tablas and joins
        " STYLE sty ",

        // 3 llave principal (mayusculas!)
        "ID");

    // define column settings
    setColumnNames("sty", "ID", "id");
    setColumnNames("sty", "NAMA", "Nama");

    setDefaultOrder("  NAMA ");

    // load data
    super.initializeTable();

    // some customization
    adjustColumnWidth("Nama", 100);

    adjustColumnType("id", BROWSER_COLUMN_TYPE_NUMERICNOFORMAT);
  }
Пример #3
0
  public void initializeTable() throws KExceptionClass {

    // set the SQL
    super.initializeSQLQuery(

        // 1 campos
        " ID, STOCKTYPEID, BUYERID, STYLEID, PRODUCT, COLOUR, QTY, IMAGE ",

        // 2 tablas and joins
        " STOCK stk   ",

        // 3 llave principal (mayusculas!)
        "ID");

    // define column settings
    // setColumnNames( "stk", "ID", "id" );
    /*     setColumnNames( "stk", "STOCKTYPEID", "StockTypeID" );
                setColumnNames( "stk", "BUYERID", "BuyerID" );
                //setColumnNames( "stk", "PRODUCT", "Product" );
                setColumnNames( "stk", "COLOUR", "Colour" );
                setColumnNames( "stk", "IMAGE", "Image" );
                setDefaultOrder( "  ID " );
    */
    setRowsHeight(150);

    // load data
    super.initializeTable();

    // some customization
    // adjustColumnWidth( "id", 100 );
    // adjustColumnWidth( "Name", 200 );
    // adjustColumnWidth( "Cost", 100 );

    // adjustColumnType( "Cost", BROWSER_COLUMN_TYPE_CURRENCY );
    // adjustColumnFont(  "Cost",  new Font( "arial", Font.BOLD, 10  ) );
    // adjustColumnForegroundColor( "Cost", Color.BLUE  );

    adjustColumnWidth("IMAGE", 210);
    setColumnRenderer("IMAGE", new ImageCellRendererClass(tableModel, log, 120, 150));
  }