blob: bba1e4e67f8afa15dbffa8ab108585b5cd369cc4 (
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
|
/*******************************************************************************
* Copyright (c) 2011 Wind River Systems, Inc. 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:
* Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Text;
import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
/**
* The section that displays the basic information of a file.
*/
public class BasicFileSection extends BasicFolderSection {
// The text field for the size of the file.
protected Text sizeText;
// The text field for the access time of the file.
protected Text accessedText;
/*
* (non-Javadoc)
* @see org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.BasicFolderSection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
*/
@Override
public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
super.createControls(parent, aTabbedPropertySheetPage);
sizeText = createTextField(null, Messages.GeneralInformationPage_Size);
accessedText = createTextField(sizeText, Messages.GeneralInformationPage_Accessed);
}
/*
* (non-Javadoc)
* @see org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.BasicFolderSection#refresh()
*/
@Override
public void refresh() {
sizeText.setText(getSizeText(clone.attr.size));
accessedText.setText(getDateText(clone.attr.atime));
super.refresh();
}
}
|