Search in sources :

Example 1 with FileTableConfiguration

use of com.mucommander.ui.main.table.FileTableConfiguration in project mucommander by mucommander.

the class MainFrameBuilder method getFileTableConfiguration.

protected FileTableConfiguration getFileTableConfiguration(FolderPanelType folderPanelType, int window) {
    FileTableConfiguration conf = new FileTableConfiguration();
    // Loop on columns
    for (Column c : Column.values()) {
        if (c != Column.NAME) {
            // Skip the special name column (always visible, width automatically calculated)
            // Sets the column's initial visibility.
            conf.setEnabled(c, MuSnapshot.getSnapshot().getVariable(MuSnapshot.getShowColumnVariable(window, c, folderPanelType == FolderPanelType.LEFT), c.showByDefault()));
            // Sets the column's initial width.
            conf.setWidth(c, MuSnapshot.getSnapshot().getIntegerVariable(MuSnapshot.getColumnWidthVariable(window, c, folderPanelType == FolderPanelType.LEFT)));
        }
        // Sets the column's initial order
        conf.setPosition(c, MuSnapshot.getSnapshot().getVariable(MuSnapshot.getColumnPositionVariable(window, c, folderPanelType == FolderPanelType.LEFT), c.ordinal()));
    }
    return conf;
}
Also used : Column(com.mucommander.ui.main.table.Column) FileTableConfiguration(com.mucommander.ui.main.table.FileTableConfiguration)

Aggregations

Column (com.mucommander.ui.main.table.Column)1 FileTableConfiguration (com.mucommander.ui.main.table.FileTableConfiguration)1