blob: b812d9af99e0f2ea940dcc2107a2f24e07957034 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
package org.openslx.dozmod.gui.control.table;
import org.openslx.virtualization.configuration.container.ContainerBindMount;
import java.util.ArrayList;
public class ContainerBindMountTable extends ListTable<ContainerBindMount> {
/**
* Version for serialization.
*/
private static final long serialVersionUID = -2908607335582645909L;
public static final ListTableColumn COL_SOURCE = new ListTableColumn("SOURCE");
public static final ListTableColumn COL_TARGET = new ListTableColumn("TARGET");
public static final ListTableColumn COL_OPTIONS = new ListTableColumn("OPTIONS");
public ContainerBindMountTable() {
super(COL_SOURCE, COL_TARGET, COL_OPTIONS);
// init with empty data list
this.setData(new ArrayList<ContainerBindMount>(), false);
}
@Override protected Object getValueAtInternal(ContainerBindMount item, ListTableColumn column) {
if (COL_SOURCE == column)
return item.getSource();
if (COL_TARGET == column)
return item.getTarget();
if (COL_OPTIONS == column)
return item.getOptions();
throw new IndexOutOfBoundsException();
}
}
|