blob: 90e7b9eecf0cffe0695eb18254f8d8569cd969c9 (
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
/*******************************************************************************
* Copyright (c) 2008, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.debug.examples.ui.midi.adapters;
import org.eclipse.debug.internal.ui.viewers.provisional.AbstractColumnPresentation;
/**
* Columns for sequencer in the variables view.
*
* @since 1.0
*/
public class TrackColumnPresentation extends AbstractColumnPresentation {
/**
* Column identifiers
*/
public static final String COL_TICK = "TICK"; //$NON-NLS-1$
public static final String COL_BYTES = "BYTES"; //$NON-NLS-1$
public static final String COL_COMMAND = "COMMAND"; //$NON-NLS-1$
public static final String COL_CHANNEL = "CHANNEL"; //$NON-NLS-1$
/**
* All columns
*/
public static final String[] COLUMN_IDS = new String[]{COL_TICK, COL_BYTES, COL_COMMAND, COL_CHANNEL};
/**
* Initial columns
*/
public static final String[] COLUMN_INITIAL = new String[]{COL_TICK, COL_BYTES};
/**
* Column presentation ID.
*/
public static final String ID = "org.eclipse.debug.examples.ui.midi.trackColumns"; //$NON-NLS-1$
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#getAvailableColumns()
*/
@Override
public String[] getAvailableColumns() {
return COLUMN_IDS;
}
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#getHeader(java.lang.String)
*/
@Override
public String getHeader(String id) {
if (COL_TICK.equals(id)) {
return "Tick"; //$NON-NLS-1$
}
if (COL_BYTES.equals(id)) {
return "Bytes"; //$NON-NLS-1$
}
if (COL_CHANNEL.equals(id)) {
return "Channel"; //$NON-NLS-1$
}
if (COL_COMMAND.equals(id)) {
return "Command"; //$NON-NLS-1$
}
return ""; //$NON-NLS-1$
}
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#getId()
*/
@Override
public String getId() {
return ID;
}
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#getInitialColumns()
*/
@Override
public String[] getInitialColumns() {
return COLUMN_INITIAL;
}
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#isOptional()
*/
@Override
public boolean isOptional() {
return false;
}
}
|