/** * Measures and returns the preferred width of the rendering component * configured with the prototype value, if any. Returns -1 if not * applicable. * * @param table the component the renderer lives in * @param columnExt the TableColumn to configure * @return the preferred width of the prototype or -1 if none. */ protected int calcPrototypeWidth(JXTable table, TableColumnExt columnExt) { int prototypeWidth = -1; Object prototypeValue = columnExt.getPrototypeValue(); if (prototypeValue != null) { // calculate how much room the prototypeValue requires TableCellRenderer cellRenderer = getCellRenderer(table, columnExt); Component comp = cellRenderer.getTableCellRendererComponent(table, prototypeValue, false, false, 0, -1); prototypeWidth = comp.getPreferredSize().width; } return prototypeWidth; }
/** * Measures and returns the preferred width of the rendering component * configured with the prototype value, if any. Returns -1 if not * applicable. * * @param table the component the renderer lives in * @param columnExt the TableColumn to configure * @return the preferred width of the prototype or -1 if none. */ protected int calcPrototypeWidth(JXTable table, TableColumnExt columnExt) { int prototypeWidth = -1; Object prototypeValue = columnExt.getPrototypeValue(); if (prototypeValue != null) { // calculate how much room the prototypeValue requires TableCellRenderer cellRenderer = getCellRenderer(table, columnExt); Component comp = cellRenderer.getTableCellRendererComponent(table, prototypeValue, false, false, 0, -1); prototypeWidth = comp.getPreferredSize().width; } return prototypeWidth; }
/** * Measures and returns the preferred width of the rendering component * configured with the prototype value, if any. Returns -1 if not * applicable. * * @param table the component the renderer lives in * @param columnExt the TableColumn to configure * @return the preferred width of the prototype or -1 if none. */ protected int calcPrototypeWidth(JXTable table, TableColumnExt columnExt) { int prototypeWidth = -1; Object prototypeValue = columnExt.getPrototypeValue(); if (prototypeValue != null) { // calculate how much room the prototypeValue requires TableCellRenderer cellRenderer = getCellRenderer(table, columnExt); Component comp = cellRenderer.getTableCellRendererComponent(table, prototypeValue, false, false, 0, -1); prototypeWidth = comp.getPreferredSize().width; } return prototypeWidth; }
/** * Measures and returns the preferred width of the rendering component * configured with the prototype value, if any. Returns -1 if not * applicable. * * @param table the component the renderer lives in * @param columnExt the TableColumn to configure * @return the preferred width of the prototype or -1 if none. */ protected int calcPrototypeWidth(JXTable table, TableColumnExt columnExt) { int prototypeWidth = -1; Object prototypeValue = columnExt.getPrototypeValue(); if (prototypeValue != null) { // calculate how much room the prototypeValue requires TableCellRenderer cellRenderer = getCellRenderer(table, columnExt); Component comp = cellRenderer.getTableCellRendererComponent(table, prototypeValue, false, false, 0, -1); prototypeWidth = comp.getPreferredSize().width; } return prototypeWidth; }
/** * Measures and returns the preferred width of the rendering component * configured with the prototype value, if any. Returns -1 if not * applicable. * * @param table the component the renderer lives in * @param columnExt the TableColumn to configure * @return the preferred width of the prototype or -1 if none. */ protected int calcPrototypeWidth(JXTable table, TableColumnExt columnExt) { int prototypeWidth = -1; Object prototypeValue = columnExt.getPrototypeValue(); if (prototypeValue != null) { // calculate how much room the prototypeValue requires TableCellRenderer cellRenderer = getCellRenderer(table, columnExt); Component comp = cellRenderer.getTableCellRendererComponent(table, prototypeValue, false, false, 0, -1); prototypeWidth = comp.getPreferredSize().width; } return prototypeWidth; }
setMinWidth(original.getMinWidth()); setPreferredWidth(original.getPreferredWidth()); setPrototypeValue(original.getPrototypeValue());
setMinWidth(original.getMinWidth()); setPreferredWidth(original.getPreferredWidth()); setPrototypeValue(original.getPrototypeValue());
setMinWidth(original.getMinWidth()); setPreferredWidth(original.getPreferredWidth()); setPrototypeValue(original.getPrototypeValue());
setMinWidth(original.getMinWidth()); setPreferredWidth(original.getPreferredWidth()); setPrototypeValue(original.getPrototypeValue());
setMinWidth(original.getMinWidth()); setPreferredWidth(original.getPreferredWidth()); setPrototypeValue(original.getPrototypeValue());