public void setTableColumnPreferences(IColumn col, boolean flush) { String keySuffix = getColumnKey(col); String key = TABLE_COLUMN_UIINDEX + keySuffix; int viewIndex = col.getVisibleColumnIndexHint(); boolean visible = col.isVisibleInternal(); int width = col.getWidth(); int sortIndex = col.getSortIndex(); boolean sortUp = col.isSortAscending(); boolean sortExplicit = col.isSortExplicit(); // if (viewIndex >= 0) { m_env.put(key, "" + viewIndex); } else { m_env.remove(key); } // key = TABLE_COLUMN_VISIBLE + keySuffix; if (!visible) { m_env.put(key, "no"); } else { m_env.put(key, "yes"); } // key = getUserAgentPrefix() + TABLE_COLUMN_WIDTH + keySuffix; if (width >= 0) { m_env.put(key, "" + width); } else { m_env.remove(key); } // key = TABLE_COLUMN_SORT_INDEX + keySuffix; if (sortIndex >= 0) { m_env.put(key, "" + sortIndex); } else { m_env.put(key, "-1"); } // key = TABLE_COLUMN_SORT_ASC + keySuffix; if (sortIndex >= 0 && sortUp) { m_env.put(key, "true"); } else { m_env.put(key, "false"); } // key = TABLE_COLUMN_SORT_EXPLICIT + keySuffix; if (sortExplicit) { m_env.put(key, "true"); } else { m_env.put(key, "false"); } if (flush) { flush(); } }