LOV on Grid

I need to use a LOV on a Grid Control.
I did all the tutorial indicate (for a standard field, not in grid) but it didn't work : it simply doesn't fire.
Does anyone know how can be done ?
TIA
Tullio

I rendered a blank field as a button and bring it up from there.
import javax.swing.table.*;
import javax.swing.*;
import java.awt.*;
* A Class class.
* <P>
* @author Linda B. Rawson
public class ButtonRenderer extends DefaultTableCellRenderer {
JCheckBox checkBox = new JCheckBox();
JButton button = new JButton();
* Constructor
public ButtonRenderer() {
public Component getTableCellRendererComponent(
JTable table, Object value,
boolean isSelected, boolean hasFocus,
int row, int column) {
String str = (value == null) ? "" : value.toString();
button.setText(str);
return button;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;
import oracle.dacf.control.swing.*;
import javax.swing.event.*;
import java.util.EventObject;
import javax.infobus.*;
import Injection.*;
* A Class SampleNameEditor class.
* <P>
* @author Linda B. Rawson
public class SampleNameLovEditor implements TableCellEditor {
private final static int COMBO = 0;
private final static int BOOLEAN = 1;
private final static int STRING = 2;
private final static int NUM_EDITOR = 3;
JCheckBox checkBox = new JCheckBox();
JButton button = new JButton();
private boolean isPushed;
public String str = "";
DefaultCellEditor[] cellEditors;
int flg = BOOLEAN; // Default to String
* Constructor
public SampleNameLovEditor() {
cellEditors = new DefaultCellEditor[NUM_EDITOR];
// Will not take button as an argument. Will only take checkbox.
checkBox = new JCheckBox();
checkBox.setOpaque( true );
checkBox.setHorizontalAlignment(JLabel.CENTER);
cellEditors[BOOLEAN] = new DefaultCellEditor(checkBox);
button = new JButton();
isPushed = true;
public Component getTableCellEditorComponent(JTable table, Object value,
boolean isSelected, int row, int column) {
flg = BOOLEAN;
if (isSelected) {
button.setForeground(table.getSelectionForeground());
button.setBackground(table.getSelectionBackground());
} else{
button.setForeground(table.getForeground());
button.setBackground(table.getBackground());
str = (value ==null) ? "" : value.toString();
button.setText( str );
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (isPushed) {
// SampleContentPanel.sampleNameLov.setRestrictedQuery("infobus:/oracle/sessionWave/lOVRowSetSampleFlTags/SampleName", null);
SampleContentPanel.sampleNameLov.show();
isPushed = false;
cancelCellEditing();
isPushed = true;
return button;
public Object getCellEditorValue() {
switch (flg) {
case COMBO:
return str;
case BOOLEAN:
case STRING:
return cellEditors[flg].getCellEditorValue();
default:
return null;
public Component getComponent() {
return cellEditors[flg].getComponent();
public boolean stopCellEditing() {
return cellEditors[flg].stopCellEditing();
public void cancelCellEditing() {
cellEditors[flg].cancelCellEditing();
public boolean isCellEditable(EventObject anEvent) {
return cellEditors[flg].isCellEditable(anEvent);
public boolean shouldSelectCell(EventObject anEvent) {
return cellEditors[flg].shouldSelectCell(anEvent);
public void addCellEditorListener(CellEditorListener l) {
cellEditors[flg].addCellEditorListener(l);
public void removeCellEditorListener(CellEditorListener l) {
cellEditors[flg].removeCellEditorListener(l);
public void setClickCountToStart(int n) {
cellEditors[flg].setClickCountToStart(n);
public int getClickCountToStart() {
return cellEditors[flg].getClickCountToStart();
public static LOV sampleNameLov = new LOV();
sampleNameLov.setDataItemName("infobus:/oracle/blah/lOVRowSetSampleFlTags");
sampleNameLov.setTitle("Sample Names");
sampleNameLov.setAutomaticRefresh(true);
Linda
Linda

Similar Messages

  • Sorting Options in "Grid View"

    Hey everyone. For the longest time I haven't had any problems with the newest release of iTunes, and in fact, love the Grid view, where I can see all my albums as if I had laid them out in a grid. I really like that. But one of my most favorite things to do on iTunes was to sort my music by most Recently Added, so I could listen to my newest music. Unfortunately, I don't think I can do that in the Grid view. When I switch over to the List view, it will, but not in Grid view, which I would love. Any help? Thank you!

    I'm with ya, Alex - I love my most Recently Added view, and it's what I sort my entire library by, most often. I never did color in the lines, or go by the alphabet, which programmers want me to do.
    Suggest it here, I have:
    http://www.apple.com/feedback/itunesapp.html
    You'd think with APple trying to be so hip and in-the-moment this feature would be a given! Since they are all about trying to have the more recent thing

  • 3.2; BC4J; Grid: attached Combo with two columns?

    Hi,
    I anybody could attach a combo to grid with two or more Columns? Or any idea to attach an LOV to grid cells?
    Thanks
    null

    package com.npevolution.util;
    import java.awt.Component;
    import javax.swing.JTable;
    import javax.swing.table.TableCellRenderer;
    import oracle.dacf.control.swing.ComboBoxControl;
    import javax.infobus.*;
    import oracle.dacf.dataset.*;
    public class ComboBoxControlRenderer extends javax.swing.JComboBox
    implements javax.swing.table.TableCellRenderer {
    private RowSetInfo rowSetInfo;
    private String colGuardar;
    private Object comboCod[];
    //@colMostrar is "Name"
    //@colGuardar is "Cod"
    public ComboBoxControlRenderer(RowSetInfo rsi, String colMostrar, String colGuardar) {
    super();
    rowSetInfo = rsi;
    this.colGuardar = colGuardar;
    try{
    ScrollableRowsetAccess m_Rs = (ScrollableRowsetAccess)rsi.getRowsetAccess();
    int rowCount = m_Rs.getRowCount();
    for (int iRow=0; iRow<rowCount; iRow++){
    m_Rs.absolute(iRow+1);
    ImmediateAccess ia = (ImmediateAccess)m_Rs.getColumnItem(colMostrar);
    String str = ia.getValueAsString();
    addItem(str);
    }catch(Exception e){
    e.printStackTrace();
    public Component getTableCellRendererComponent(JTable table,
    Object value, boolean isSelected, boolean hasFocus,
    int row, int column) {
    ScrollableRowsetAccess rs = rowSetInfo.getRowsetAccess();
    int index = 0;
    try {
    boolean moreRows = rs.first();
    while (moreRows) {
    if (value.equals(((ImmediateAccess)rs.getColumnItem(colGuardar)).getValueAsString())) {
    break;
    } else {
    index++;
    moreRows = rs.next();
    } catch (Exception ex) {
    System.out.println("Error al buscar el indice en el Renderer: " + ex.getMessage());
    if (index < rs.getRowCount()){
    setSelectedIndex(index);
    return this;
    import java.awt.Component;
    import java.util.EventObject;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    import oracle.dacf.control.swing.ComboBoxControl;
    import javax.infobus.*;
    import oracle.dacf.dataset.*;
    public class ComboBoxControlEditor extends JComboBox
    implements javax.swing.table.TableCellEditor{
    protected EventListenerList listenerList = new EventListenerList();
    protected ChangeEvent changeEvent = new ChangeEvent(this);
    private RowSetInfo rowSetInfo;
    private String colMostrar;
    private String colGuardar;
    private Object comboCod[];
    * Constructor
    *@param rsi RowSetInfo que se utiliza para cargar el JComboBox
    *@param colMostrar nombre del AttributeInfo del RowSetInfo que muestra el combo
    *@param colGuardar nombre del AttributeInfo del RowSetInfo que se tiene que asignar a la celda del editor
    public ComboBoxControlEditor(RowSetInfo rsi, String colMostrar, String colGuardar) {
    super();
    rowSetInfo = rsi;
    this.colGuardar = colGuardar;
    this.colMostrar = colMostrar;
    addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent event) {
    fireEditingStopped();
    try{
    ScrollableRowsetAccess m_Rs = (ScrollableRowsetAccess)rsi.getRowsetAccess();
    int rowCount = m_Rs.getRowCount();
    comboCod = new Object[rowCount];
    for (int iRow=0; iRow<rowCount; iRow++){
    m_Rs.absolute(iRow+1);
    ImmediateAccess ia = (ImmediateAccess)m_Rs.getColumnItem(colMostrar);
    String str = ia.getValueAsString();
    addItem(str);
    ia = (ImmediateAccess)m_Rs.getColumnItem(colGuardar);
    str = ia.getValueAsString();
    comboCod[iRow] = str;
    }catch(Exception e){
    e.printStackTrace();
    * Mitodo que devuelve el atributo rowSetInfo del ComboBoxControlRenderer.
    * @return RowSetInfo
    public RowSetInfo getRowSetInfo() {
    return rowSetInfo;
    * Mitodo que establece el valor del atributo rowSetInfo del ComboBoxControlRenderer.
    * @param rs RowSetInfo que se asocia
    public void setRowSetInfo(RowSetInfo rsi) {
    rowSetInfo = rsi;
    * Mitodo del interfaz TableCellEditor.
    public void addCellEditorListener(CellEditorListener listener) {
    listenerList.add(CellEditorListener.class,listener);
    * Mitodo del interfaz TableCellEditor.
    public void removeCellEditorListener(CellEditorListener listener) {
    liste nerList.remove(CellEditorListener.class,listener);
    protected void fireEditingStopped() {
    CellEditorListener listener;
    Object[] listeners = listenerList.getListenerList();
    for (int i=0; i<listeners.length; i++) {
    if (listeners[i] == CellEditorListener.class) {
    listener = (CellEditorListener) listeners[i+1];
    listener.editingStopped(changeEvent);
    protected void fireEditingCanceled() {
    CellEditorListener listener;
    Object[] listeners = listenerList.getListenerList();
    for (int i=0; i<listeners.length; i++) {
    if (listeners[i] == CellEditorListener.class) {
    listener = (CellEditorListener) listeners[i+1];
    listener.editingCanceled(changeEvent);
    * Mitodo del interfaz TableCellEditor.
    public void cancelCellEditing() {
    fireEditingCanceled();
    * Mitodo del interfaz TableCellEditor.
    public boolean stopCellEditing() {
    fireEditingStopped();
    return true;
    * Mitodo del interfaz TableCellEditor.
    public boolean isCellEditable (EventObject event) {
    return true;
    * Mitodo del interfaz TableCellEditor.
    public boolean shouldSelectCell(EventObject event) {
    return true;
    * Mitodo del interfaz TableCellEditor.
    * Devuelve un objeto con el valor contenido en el editor.
    public Object getCellEditorValue() {
    String seleccionado = (String)this.getSelectedItem();
    ScrollableRowsetAccess rs = rowSetInfo.getRowsetAccess();
    String codigo = "";
    try {
    boolean moreRows = rs.first();
    while (moreRows) {
    if (seleccionado.equals(((ImmediateAccess)rs.getColumnItem(colMostrar)).getValueAsString())) {
    codigo = ((ImmediateAccess)rs.getColumnItem(colGuardar)).getValueAsString();
    break;
    moreRows = rs.next();
    } catch (Exception ex) {
    System.out.println("Error al buscar: " + ex.getMessage());
    return codigo;
    * Mitodo del interfaz TableCellEditor.
    * Establece un valor inicial para el editor.
    * Devuelve el componente para editar.
    public Component getTableCellEditorComponent(JTable table,
    Object value, boolean isSelected, int row, int column) {
    ScrollableRowsetAccess rs = rowSetInfo.getRowsetAccess();
    int index = 0;
    try {
    boolean moreRows = rs.first();
    while (moreRows) {
    if (value.equals(((ImmediateAccess)rs.getColumnItem(colGuardar)).getValueAsString())) {
    break;
    } else {
    index++;
    moreRows = rs.next();
    } catch (Exception ex) {
    System.out.println("Error al buscar: " + ex.getMessage());
    if (index < rs.getRowCount()){
    setSelectedIndex(index);
    return this;
    null

  • AdvancedDataGrid LOV

    Hi,
       We are working on an advanceddatagrid functionality where we have extended the functionality of advanceddatagrid to include a LOV (which displays user_id, name and email_address). The user can select either the user_id or name to populate all the 3 fields.
    The user can add any number of rows by clicking on 'Add' Button
    When the user enters a user id or name and hits tab button, it populates all the 3 fields correctly.
    When the user enters a user id or name in the 1st row and clicks on the 2nd row, the 2nd row becomes active and the data gets populated in the second row instead of 1st row. This is a bug reported by our user. We are unable to find a solution for this.
    Any help or comments is highly appreciated!!!
    Thanks in advance

    Denis BERNET (guest) wrote:
    : Thanks for your answer.
    : What do you mean with a Model ? A (java) TableModel ?
    : Bye
    : Denis BERNET
    : Nedelescu Marian (guest) wrote:
    : : Try to make a model for your grid ,maps each column of model
    : : into a rowset column and add lov for your column.
    : : BERNET (guest) wrote:
    : : : LOV (List Of Values) works on a vertical layout java form.
    : : : But the same LOV (and LOVRowSetInfo) doesn't work for a
    GRID
    : : java
    : : : form.
    : : : Bug or specific action for LOV on GRID ?
    : : : Thanks for your help.
    : : : Denis BERNET
    Yes ! A Java Table Model.
    null

  • Select multiple LOV values & display in a grid

    How to implement an LOV where user can select any multiple values and these values will be displayed in a grid?

    Read this hOW to use SelectManyListbox or SelectManyChoice?
    Its for an older version but as Frank said it should work.
    Next option is to google :-)
    Timo

  • GRID LINES IN LOV

    Is it possible to show grid lines( like forms block ) in lov's instead of plain background.

    I know that I can control the origin of the rulers, but when I change that, the grid lines do not change, which is quite annoying.
    Depends on which version of Illustrator you are using.
    In recent versions turn on global rulers, then change the rulers origin in order to position the grid.

  • How to create a multi column list item and select these values from a LOV

    Hi all,
    My requirements are:
    1) create an LOV which holds the productno, productname and productprice fields (this is working)
    2) at run time, select one record from LOV and populate the list/grid with this selected record values of productno, productname and productprice fields, so we are showing them on the form in the form of a table/grid (not working)
    3) be able to select multiple records from LOV and be able to populate the list item with multiple records (not working)
    4) have two more columns in the list/grid, for productquatity and total price (not wokring)
    Please help me.
    how can i create this grid or list in oracle
    whats the possible way of acheiving this in oracle

    If you use a list item to display multiple columns then you'll need to use a fixed-width font. You can achieve a similar look with proportional fonts by using a normal block and setting the fields' bevel to 'None'.
    Each column in the LOV has a Return Item property (under Column Mapping Properties). Set this to a :block.item reference for each column to bring the data back into those referenced fields.
    You can't select multiple records from an LOV. For this you will need to create your own form. Check the help for system.mouse_button_modifiers to see how to respond to Ctrl+click and Shift+click.
    To add columns just modify the LOV's record group's query.

  • Moving Images in Grid View

    I can't for the life of me move individual images or groups of images around freely in grid view. The tutorial says to drag from the center of a thumbnail and drag it to the location you want it. I tried that and it just springs back to where it came from. I would like to randomly move images around in grid view and then number and rename. Any help is much appreciated
    dgibb

    I disagree. My point is that one should not have to keep in mind an underlying computing model in order to know when you can and can't sort.
    In general (not a Lightroom point), as I'm primarily a PC user I'm used to climbing learning curves, but I love the transparency of Macs when I do use them.
    That sorting isn't available in Lightroom just because I have an empty sub-folder makes no sense from the photographer's viewpoint.
    It's not a big deal, but the sorting constraints are a clumsy rough edge in largely excellent UI.
    js

  • Problem sorting by Artist in grid view using Itunes 8

    I have a lot of albums that contain various artist and i set up the info in each with the correct artist name and "various artist" as the album artist. In itunes 8 when i use grid view and use show by artist it displays by album artist putting all the albums by "various artist" in one grid. It's correct in list and cover flow view. How can i set the grid view to display by the artist of the song and not the album. (ex. Soundtrack from the motion picture Tropic Thunder: Display "U Can't Touch This" under MC Hammer instead of Various Artist)

    Actually, the grid view should be using the Album Artist tag. When the Album Artist tag was added in iTunes 7.0, the intent was to allow users to properly tag songs based on the artist and any guest artists. For instance, on Luther Vandross’ album +Give Me The Reason+ Track 6, “There’s Nothing Better Than Love” is a duet. Therefore, while the Artist tag for the rest of the tracks should be ‘Luther Vandross’, the correct tag content for Track 6 is ‘Luther Vandross duet with Greory Hines’. Without having ‘Luther Vandross’ in all the Album Artist tags for all 9 album tracks, iTunes would split the album as if there are two albums of the same name by different artists.
    The other situation are producer-driven albums like Quincy Jones’ +The Dude+ or +Back On The Block+ . These are not compilations, as you described, because the songs were produced for the albums and Quincy Jones, although not a performer on any of the tracks, is the album artist. The exception is soundtracks that are compilations of songs typically produced for a given film. Like the situation you describe, each track has a different artist, so by having ‘Quincy Jones’ in the Album Artist tag for each track, iTunes maintains the integrity of the album and keeps the tracks properly grouped.
    (Now if Apple would only acknowledge and fix the persistent bug that does not carry these grouping and sorting features over to the user’s music folder when they have enabled “Keep iTunes Music folder organized” in iTunes’ preferences.)
    The situation you are specifically referencing is that of tagging compilations—albums that consist of tracks by various artists where there is no actual album artist—but you have used the Album Artist tag effectively forcing iTunes to see them as single artist albums. I also tag compilations—e.g., Various Artists (Hip Hop), Various Artists (Jazz), Various Artists (R&B), Various Artists (Soundtrack), etc.—, so I understand what you have done. Unfortunately, the fix for forcing the grid view to recognize individual artists in compilations may require you to clear out the Album Artist tag on all of your compilation album tracks forcing iTunes to revert to the Artist tag in place of the Album Artist tag.
    What I would suggest is clearing the Album Artist tag of just one compilation and seeing what happens. If the album appears under “Unknown Artist”, or some other generic listing, in the grid view then iTunes only recognizes the Album Artist tag and I am at a loss as to what you could do. If it works as you hope, then you can go ahead an clear out the Album Artist field on the rest of your compilation albums.
    The downside of clearing the Album Artist field is that iTunes will revert to its pre-version 7 habits and break up the albums; that is, a compilation with 12 tracks by 12 different artists will appear in the various views as 12 different albums albeit with the same name and cover art. To keep the tracks properly grouped in other views, you will need to mark all of the tracks from the compilation albums as “Part of a compilation” in the info dialog.

  • How to make one of the columns in my tabular an text item with popup lov

    Hello,
    I want to manually make one of the columns say for the deptno in my tabular form as on text item popup lov using apex_item package
    and whenever user clicks on the text item popup lov, it should open up an dept table report and from which he/she needs to select
    the deptno and this deptno should be returned into the text item popup lov column.
    like for example: say if i have an emp table tabular form with all the columns and deptno column as an popup lov and when user clicks on this column
    it should open up an new sql report(similar to popup lov window), the select statement for this would be
    select deptno,dname,loc from dept order by 1;
    And from this popup lov report whenever an user selects a particular deptno, the same deptno should be returned to my text item popup column in emp tabular form.
    something like this
    select
    "EMPNO",
    "EMPNO" EMPNO_DISPLAY,
    "ENAME",
    "JOB",
    "MGR",
    "HIREDATE",
    "SAL",
    "COMM",
    APEX_ITEM.TEXT(3,deptno,20,50,'readonly=true') || '<img height="16" align="middle" width="16" style="vertical-align: middle;" alt="Popup Lov" src="/i/lov_16x16.gif"/>' deptno
    from "#OWNER#"."EMP"
    like i made my column as an text item lov and now I want to write an onclick event for the text item lov so that an popup window is displayed which is a sql report of the table dept (select deptno,dname,loc from dept order by 1;) and in this report i want to make deptno as an link so that when ever an user clicks on it
    -- this value should be returned to my text item popup lov column deptno in the emp tabular form.
    can anyone help me out with this issue.
    thanks,

    Hi,
    Refer to the link for the detailed information on ALV Grid.
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
    Hope it helps.
    Regards,
    Rajesh Kumar
    Edited by: Rajesh Kumar on May 25, 2009 9:13 AM

  • Background task problem with alv grid display

    Hello !
    I have a problem when executing my program in background.
    In foreground I have no problem, my ALV appears. In the background I have a dump.
    The current ABAP program "SAPLKKBL" had to be terminated because one of the statements could not be executed.
    I use the function module 'REUSE_ALV_GRID_DISPLAY'
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
            i_callback_program      = gd_repid
            i_callback_user_command = 'F533_USER_COMMAND'
            is_layout               = gd_layout
            it_fieldcat             = fieldcatalog[]
            it_special_groups       = i_fgroup[]
            i_save                  = 'X'
            it_sort                 = gd_sort
            i_buffer_active         = ' '
            i_callback_pf_status_set = 'F534_SET_PF_STATUS'
         TABLES
            t_outtab                = mytab
         EXCEPTIONS
            program_error           = 1
            OTHERS                  = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    I don't understand where the problem is. Please help me.
    Thank you.

    I love replying to old threads:
    Try this link
    http://scn.sap.com/people/prashant.patil12/blog/2007/02/20/displaying-alv-grid-in-background-job

  • How to turn of this blue grid?? pdf file in this link...

    How to turn of this blue grid and picture background?? pdf file in this link:
    http://www.grad.hr/mostovi/files/masivni/04_masivni_mostovi.pdf
    I need to print, but with all this color it would be a huge blow for my toner!
    p.s. I have adobe acrobat x pro...

    these pdf files are made from one or more huge books, to make learning little easier for us students... on one college subject from c.ing.
    as you can see here - http://www.grad.hr/mostovi/ma1.html - there are more of them. and they are here so that we can learn from them.
    they are made for visual purpose, all these difrent colors, when having lecturers in classroom on projector.
    yes, i can print them as they are now, but, as i said... because of toner and it's 100x easier to learn black from white, i'd love to have them in that way...
    p.s. what is preflight??
    cheers.

  • How to divide a grid (an 2D array) into subgrids? [Suduko]

    Hey guys
    I've been struggling with a problem with my Suduko program for a few days now and thought I could get some help here.
    The problem is that I have no idea how to divide a Suduko grid and stuff them into subgrids.
    My current plan is to go through the Suduko array r * c times (where r and c is the dimensions of a subgrid) and stuff the cells into my quad array (somehow). I've gone through the sourcecode of 4 suduko programs on sourceforge, but still can't find a solution (mainly because I can't read other prog. lannguages yet).
    My code:
    * easyIO is a packadge that enables read/write to files
    * and enables communication between the user and the program via the command-line
    * You can find this packadge here: http://www.universitetsforlaget.no/java/easyIO.zip
    import easyIO.*;
    /** Initialises the board */
    class Oblig2
         public static void main(String[] args)
              /** If there is a argument in the command line (the filename to be used in this case),
               *  then send that argument with a new Board
              if(args.length >= 0)
                   Board suduko = new Board(args[0]);
    class Board
         /** Constant (yeah, no final int) that defines the board dimensisions, if dimension is 6, then the board is 6 x 6 */
         int dimension;
         /** The quad dimensions */
         int quadRow;
         int quadCol;
        Cell[][] cells;
        Row[] row;
        Col[] col;
        Quad[] quad;
         * Board contructor defines the boards properties
         * @param filename comes from Oblig2.main()
        Board(String filename)
              /** In is a class of easyIO, inFile will contain the contents of the file */
              In inFile = new In(filename);
              dimension = inFile.inInt("\n"); System.out.print(dimension + "\n");
              quadRow = inFile.inInt("\n"); System.out.print(quadRow + "\n");
              quadCol = inFile.inInt("\n"); System.out.print(quadCol + "\n");
              inFile.readLine();
              /** Creates all the neccessary cell, row, cols and quad arrays */
              cells = new Cell[dimension][dimension];
              row = new Row[dimension];
              col = new Col[dimension];
              quad = new Quad[quadRow * quadCol];
              /** Initializes all the rows */
              for(int i = 0; i < row.length; i++)
                   row[i] = new Row(dimension);
              /** Initializes all cols */
              for(int i = 0; i < col.length; i++)
                   col[i] = new Col(dimension);
              /** Initializes all quads */
              for(int i = 0; i < quad.length; i++)
                   quad[i] = new Quad(quadRow, quadCol);
              /** Initializes all cells and puts them in rows and cols */
              for(int i = 0; i < cells.length; i++)
                   for(int j = 0; j < cells.length; j++)
                        cells[i][j] = new Cell();
                        row[i].addCell(cells[i][j]);
                        col[j].addCell(cells[i][j]);
                        cells[i][j].addRCpointer(row[i], col[j]);
              for(int i = 0; i < (quadRow * quadCol)
                   for(int j = 0; i < cells.length; j++)
                        for(int k = 0; k < cells[k].length; k++
              /** Reads the file until it reaches the end of the file */
              while(!inFile.endOfFile())
              /** Closes the filecontainer */
              inFile.close();
    class Row
         /** Single col. array to contain cells in row */
         Cell[] row;
         * Assigns an array with length=rowVal
         * @param is the same as dimension in Board-class
         Row(int rowVal)
              row = new Cell[rowVal];
         /** Add cell to row
         * If the cell is null, or empty, then it will set the cell[i] = cell,
         * and return control back to the caller
         void addCell(Cell cell)
              for(int i = 0; i < row.length; i++)
                   if(row[i]==null)
                        row[i] = cell;
                        return;
         * Checks if it's possible to stuff a number into the row,
         * returns true if it's possible and false else
         boolean tryNumeral(int cellVal)
              for(int i = 0; i < row.length; i++)
                   if(row[i].getContains() == cellVal)
                   { return false; }
              return true;
    class Col
         /** Single col. array to contain cells in col.*/
    Cell[] col;
    * Assigns an array with length=colVal
    * @param is the same as dimension in Board-class
    Col(int colVal)
              col = new Cell[colVal];
         /** Add cell to col.
         * If the cell is null, or empty, then it will set the cell[i] = cell,
         * and return control back to the caller
         void addCell(Cell cell)
              for(int i = 0; i < col.length; i++)
                   if(col[i]==null)
                        col[i] = cell;
                        return;
         * Checks if it's possible to stuff a number into the col,
         * returns true if it's possible and false else
         boolean tryNumeral(int cellVal)
              for(int i = 0; i < col.length; i++)
                   if(col[i].getContains() == cellVal)
                   { return false; }
              return true;
    class Quad
         /** Single col. array to contain cells in quad*/
    Cell[] quad;
         /** Assigns an array with length=row*col to quad */
    Quad(int row, int col)
              quad = new Cell[row * col];
         /** Add cell to quad
         * If the cell is null, or empty, then it will set the cell[i] = cell,
         * and return control back to the caller
         void addCell(Cell cell)
              for(int i = 0; i < quad.length; i++)
                   if(quad[i]==null)
                        quad[i] = cell;
                        return;
         * Checks if it'possible to stuff a number into the quad.
         * returns true if it's possible and false else.
         boolean tryNumeral(int cellVal)
              for(int i = 0; i < quad.length; i++)
                   if(quad[i].getContains() == cellVal)
                   { return false; }
              return true;
    /** The lowest unit on a Suduko board */
    class Cell
         /** The number the box contains */
    int contains;
         /** Pointers to the row/col/quad it's located in */
    Row cellRow;
    Col cellCol;
    Quad cellQuad;
         /** Add pointers from Board-contructor R = Row, C = Col. */
         void addRCpointer(Row row, Col col)
              cellRow = row;
              cellCol = col;
         /** Checks if it's okay to place a number there */
    void tryNumeral()
    /** Get-method for the cells value */
    int getContains()
              return this.contains;

    nitinkajay wrote:
    I want to know how to store the output of a analog to digital converter into an 2D labview array.
    How exactly are you performing 'Analog to Digital'???
    Grabbing image using camera OR performing data acquisition using DAQ card OR some other way????
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.

  • [Solved] wy i can place xfce4 desktop icons in a "grid" only?

    hello archers!
    im in love with xfce4 DE, but the annoying thing is that i can place the desktop icons only in a invisible "grid" of tiles.
    i changed the display manager to gdm, but it didn't help. i tryed changing the WM, but didn't not find out how to do that.
    Yes, i dont understand how DE's working internal, cause there are so many parts, as DM, WM, session-manager, and so on, which confuses me.
    So how i can place my icons individually on the desktop?
    Thanks in advance!!
    Last edited by xfce-tux (2011-09-12 21:13:34)

    Another way to adjust the desktop grid size settings and more. 
    Source:  http://git.xfce.org/xfce/xfdesktop/tree/README
    HIDDEN CUSTOMISATIONS
    ~~~~~~~~~~~~~~~~~~~~~
    If you're using the icon view, and would like to change how the text looks,
    you have three things you can change: the opacity (transparency) of the
    rounded text background, the color of the rounded text background, and the
    color of the text itself.
    You'd want to add something like this to your ~/.gtkrc-2.0 file:
    style "xfdesktop-icon-view" {
    XfdesktopIconView::label-alpha = 75
    XfdesktopIconView::selected-label-alpha = 100
    XfdesktopIconVIew::ellipsize-icon-labels = 1
    XfdesktopIconView::shadow-x-offset = 1
    XfdesktopIconView::shadow-y-offset = 1
    XfdesktopIconView::shadow-color = "#ff0000"
    XfdesktopIconView::selected-shadow-x-offset = 2
    XfdesktopIconView::selected-shadow-y-offset = 2
    XfdesktopIconView::selected-shadow-color = "#00ff00"
    XfdesktopIconVIew::cell-spacing = 6
    XfdesktopIconView::cell-padding = 6
    XfdesktopIconView::cell-text-width-proportion = 2.5
    base[NORMAL] = "#00ff00"
    base[SELECTED] = "#5050ff"
    base[ACTIVE] = "#0000ff"
    fg[NORMAL] = "#ff0000"
    fg[SELECTED] = "#ff0000"
    fg[ACTIVE] = "#ff0000"
    widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"
    The first three entries set the opacity of the rounded text background
    (allowed values are from 0 (totally transparent) to 255 (totally opaque),
    and whether or not unselected icons get their labels ellipsized
    (truncated) to fit on one line. (The 'selected-' version controls the
    opacity of icons that have been selected with the mouse.)
    The second six entries can be used to enable a text shadow to be painted
    with the icon labels. The offsets are in pixels. Setting them to 0 (the
    defaults) will disable the shadows entirely. Again, the 'selected-'
    versions apply to icons that have been selected with the mouse.
    The third four entries set spacing and sizing for individual icons on
    the grid. The 'cell-spacing' property specifies the spacing between each
    'cell' in the grid of icons. The 'cell-padding' property sets extra
    padding placed around each icon+text. The units for these two are in
    pixels. The 'cell-text-width-proportion' property specifies the maximum
    width of the text label underneat the icon, as a multiplier of the icon
    width (so for 30px icons, '2.5' would leave a 75px wide area underneath
    for the text).
    The fourth three entries set the color of the rounded text background.
    * NORMAL sets the color for the regular, unselected state.
    * SELECTED sets the color for when the icon is selected, and the desktop has
    keyboard/mouse focus.
    * ACTIVE sets the color for when the icon is selected, but the desktop does
    not have keyboard/mouse focus.
    The final three entries set the color of the label text. See above for the
    differences between NORMAL, SELECTED, and ACTIVE.

  • Storing value in a grid before storing to a database

    Apex 4
    Oracle 10g EE
    Good Day I have this problem that states that when a user click the add button the value in the textfield will be stored in a grid, when he enter another value and click the ADD button it will store again in the next line of the grid so you have already two values in the grid. When the user press the SAVE button all values in the grid must be stored in my database two rows in the grid means two rows also on my database. How will I do that in apex? Any examples out their that will guide me? I really need your help. thanks a lot.

    thanks for the reply, I've been searching for collection but I can't really understand what will be the process for it. Do you have any examples related to this problem? I guess no one can make this, Ive been browsing for whole day and no one clears my mind on how to deal with this problem. Im not good in jquery either im just a VB lover but apex seems to hit my nerves. dude. Any one out here who is will to give examples bout this problem? thanks so much..

Maybe you are looking for

  • How can I use a POJO as a resource

    I'm trying to figure out how I can use a simple class I have written with methods and properties in Sutdio Creator. I have been looking around, but I've only found how to use an EJB directly from Creator. We would like to use a bean that handles all

  • Header doesn't show in a JTable

    I can't, for the life of me, make a simple header appear in a JTable.... Here's the code that I'm using.... DefaultTableModel dm = new DefaultTableModel();     dm.setDataVector(new Object[][]{       {"119","foo","bar","ja","ko","zh"},       {"911","b

  • Creating Rpt Conmgr Cache File In Temp folder while opening report from app

    hi frends, I m facing one problem with my Web based erp application which is developed in .net , in my application when i open the  report from my applicaiton , in my temp folder there one file gets created name is "rpt conmgr cache" bcoz of this for

  • B&W G3 9.2.2 upgrade to Panther

    Hi, i am going to upgrade a 350MHz B&WG3 to Panther from 9.2.2. I have read one or two posts where things have gone wrong so i am anxious to avoid that. I want to keep internet settings e.t.c. i currently have on 9.2.2. but obviously will want to use

  • Wintel to MAC Connection -- Com1 to USB? What cable is Used?

    1. I am attempting to port data from a production machine with Com Ports into a Powerbook G4. This was previously done through the Com Ports to a Windows Box. I have migrated to a MAC and want to replicate the previous process. I am new the MAC but a