/* Could do the same for label, using val.getLabel() * and passing a String in parameter */ public void selectByValue(int value){ FilterValue row = null; for(FilterValue val : model){ //Searching for the corresponding FilterValue if(val.getValue() == value){ row = val; } } cbFilter1.setSelectedItem(row); //Select the corresponding row }
long toLong(FilterValue litValue) { return ((Number) litValue.getValue()).longValue(); }
long toLong(FilterValue litValue) { return ((Number) litValue.getValue()).longValue(); }
cbFilter1 = new JComboBox(model); cbFilter1.setBounds(176, 70, 90, 20); cbFilter1.setSelectedIndex(5); // EDITED pnlOUT1.add(cbFilter1); cbFilter1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JComboBox comboBox = (JComboBox)e.getSource(); FilterValue item = (FilterValue)comboBox.getSelectedItem(); System.out.println( item.getValue() + " : " + item.getLabel() ); } });
public static void setSelectedValue(JComboBox comboBox, int value) { FilterValue item; for (int i = 0; i < comboBox.getItemCount(); i++) { item = (FilterValue)comboBox.getItemAt(i); if (item.getValue() == value) { comboBox.setSelectedIndex(i); break; } } }
public void appendTo(SQLBuffer buf, FilterValue target, FilterValue[] args, ClassMapping type, JDBCStore store) { if (!args[0].isConstant()) throw new UserException(_loc.get("const-only", TAG)); buf.append(args[0].getValue().toString()); }
public void appendTo(SQLBuffer buf, FilterValue target, FilterValue[] args, ClassMapping type, JDBCStore store) { if (!args[0].isConstant()) throw new UserException(_loc.get("const-only", TAG)); buf.append(args[0].getValue().toString()); }
public void appendTo(SQLBuffer buf, FilterValue target, FilterValue[] args, ClassMapping type, JDBCStore store) { if (!args[0].isConstant()) throw new UserException(_loc.get("const-only", TAG)); buf.append(args[0].getValue().toString()); }
public void appendTo(SQLBuffer buf, FilterValue target, FilterValue[] args, ClassMapping type, JDBCStore store) { if (!args[0].isConstant()) throw new UserException(_loc.get("const-only", TAG)); buf.append(args[0].getValue().toString()); }
public void appendTo(SQLBuffer buf, FilterValue target, FilterValue[] args, ClassMapping type, JDBCStore store) { if (!args[0].isConstant()) throw new UserException(_loc.get("const-only", TAG)); buf.append(args[0].getValue().toString()); }
public void appendTo(SQLBuffer buf, FilterValue target, FilterValue[] args, ClassMapping type, JDBCStore store) { if (!args[0].isConstant()) throw new UserException(_loc.get("const-only", TAG)); if (!target.isPath()) throw new UserException(_loc.get("path-only", TAG)); // alias the column using the target's context, so that the // correct relation path to the target is used ClassMapping mapping = target.getClassMapping(); String colName = args[0].getValue().toString(); buf.append(target.getColumnAlias(colName, mapping.getTable())); }
public void appendTo(SQLBuffer buf, FilterValue target, FilterValue[] args, ClassMapping type, JDBCStore store) { if (!args[0].isConstant()) throw new UserException(_loc.get("const-only", TAG)); if (!target.isPath()) throw new UserException(_loc.get("path-only", TAG)); // alias the column using the target's context, so that the // correct relation path to the target is used ClassMapping mapping = target.getClassMapping(); String colName = args[0].getValue().toString(); buf.append(target.getColumnAlias(colName, mapping.getTable())); }
public void appendTo(SQLBuffer buf, FilterValue target, FilterValue[] args, ClassMapping type, JDBCStore store) { if (!args[0].isConstant()) throw new UserException(_loc.get("const-only", TAG)); if (!target.isPath()) throw new UserException(_loc.get("path-only", TAG)); // alias the column using the target's context, so that the // correct relation path to the target is used ClassMapping mapping = target.getClassMapping(); String colName = args[0].getValue().toString(); buf.append(target.getColumnAlias(colName, mapping.getTable())); }
public void appendTo(SQLBuffer buf, FilterValue target, FilterValue[] args, ClassMapping type, JDBCStore store) { if (!args[0].isConstant()) throw new UserException(_loc.get("const-only", TAG)); if (!target.isPath()) throw new UserException(_loc.get("path-only", TAG)); // alias the column using the target's context, so that the // correct relation path to the target is used ClassMapping mapping = target.getClassMapping(); String colName = args[0].getValue().toString(); buf.append(target.getColumnAlias(colName, mapping.getTable())); }
public void appendTo(SQLBuffer buf, FilterValue target, FilterValue[] args, ClassMapping type, JDBCStore store) { if (!args[0].isConstant()) throw new UserException(_loc.get("const-only", TAG)); if (!target.isPath()) throw new UserException(_loc.get("path-only", TAG)); // alias the column using the target's context, so that the // correct relation path to the target is used ClassMapping mapping = target.getClassMapping(); String colName = args[0].getValue().toString(); buf.append(target.getColumnAlias(colName, mapping.getTable())); }
public void appendTo(SQLBuffer buf, FilterValue target, FilterValue[] args, ClassMapping type, JDBCStore store) { if (!args[0].isConstant()) throw new UserException(_loc.get("const-only", TAG)); Object val = args[0].getValue(); target.appendTo(buf); if (val == null) buf.append(" IS ").appendValue(null); else buf.append(" LIKE ").appendValue("%" + val + "%"); } }
public void appendTo(SQLBuffer buf, FilterValue target, FilterValue[] args, ClassMapping type, JDBCStore store) { if (!args[0].isConstant()) throw new UserException(_loc.get("const-only", TAG)); Object val = args[0].getValue(); target.appendTo(buf); if (val == null) buf.append(" IS ").appendValue(null); else buf.append(" LIKE ").appendValue("%" + val + "%"); } }
public void appendTo(SQLBuffer buf, FilterValue target, FilterValue[] args, ClassMapping type, JDBCStore store) { if (!args[0].isConstant()) throw new UserException(_loc.get("const-only", TAG)); Object val = args[0].getValue(); target.appendTo(buf); if (val == null) buf.append(" IS ").appendValue(null); else buf.append(" LIKE ").appendValue("%" + val + "%"); } }
public void appendTo(SQLBuffer buf, FilterValue target, FilterValue[] args, ClassMapping type, JDBCStore store) { if (!args[0].isConstant()) throw new UserException(_loc.get("const-only", TAG)); Object val = args[0].getValue(); target.appendTo(buf); if (val == null) buf.append(" IS ").appendValue(null); else buf.append(" LIKE ").appendValue("%" + val + "%"); } }
public void appendTo(SQLBuffer buf, FilterValue target, FilterValue[] args, ClassMapping type, JDBCStore store) { if (!args[0].isConstant()) throw new UserException(_loc.get("const-only", TAG)); Object val = args[0].getValue(); target.appendTo(buf); if (val == null) buf.append(" IS ").appendValue(null); else buf.append(" LIKE ").appendValue("%" + val + "%"); } }