Package org.compiere.grid.ed

Examples of org.compiere.grid.ed.VCellRenderer


      tc.setHeaderRenderer(new VHeaderRenderer(DisplayType.YesNo));
    }
    //  Date
    else if (c == Timestamp.class)
    {
      tc.setCellRenderer(new VCellRenderer(DisplayType.Date));
      if (readOnly)
        tc.setCellEditor(new ROCellEditor());
      else
        tc.setCellEditor(new MiniCellEditor(c));
      m_minWidth.add(new Integer(30));
     
      tc.setHeaderRenderer(new VHeaderRenderer(DisplayType.DateTime));
    }
    //  Amount
    else if (c == BigDecimal.class)
    {
      tc.setCellRenderer(new VCellRenderer(DisplayType.Amount));
      if (readOnly)
      {
        tc.setCellEditor(new ROCellEditor());
        m_minWidth.add(new Integer(70));
      }
      else
      {
        tc.setCellEditor(new MiniCellEditor(c));
        m_minWidth.add(new Integer(80));
      }
     
      tc.setHeaderRenderer(new VHeaderRenderer(DisplayType.Number));
    }
    //  Number
    else if (c == Double.class)
    {
      tc.setCellRenderer(new VCellRenderer(DisplayType.Number));
      if (readOnly)
      {
        tc.setCellEditor(new ROCellEditor());
        m_minWidth.add(new Integer(70));
      }
      else
      {
        tc.setCellEditor(new MiniCellEditor(c));
        m_minWidth.add(new Integer(80));
      }
     
      tc.setHeaderRenderer(new VHeaderRenderer(DisplayType.Number));
    }
    //  Integer
    else if (c == Integer.class)
    {
      tc.setCellRenderer(new VCellRenderer(DisplayType.Integer));
      if (readOnly)
        tc.setCellEditor(new ROCellEditor());
      else
        tc.setCellEditor(new MiniCellEditor(c));
      m_minWidth.add(new Integer(30));
     
      tc.setHeaderRenderer(new VHeaderRenderer(DisplayType.Number));
    }
    //  String
    else
    {
      tc.setCellRenderer(new VCellRenderer(DisplayType.String));
      if (readOnly)
        tc.setCellEditor(new ROCellEditor());
      else
        tc.setCellEditor(new MiniCellEditor(String.class));
      m_minWidth.add(new Integer(30));
View Full Code Here

TOP

Related Classes of org.compiere.grid.ed.VCellRenderer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.