KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > views > memory > ReformatAction


1 /*******************************************************************************
2  * Copyright (c) 2004 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.debug.internal.ui.views.memory;
12
13 import org.eclipse.debug.internal.ui.DebugUIMessages;
14 import org.eclipse.jface.action.Action;
15
16 /**
17  * Resize all columns
18  *
19  * @since 3.0
20  */

21 public class ReformatAction extends Action {
22     
23     ITableMemoryViewTab fViewTab;
24     
25     private static final String JavaDoc PREFIX = "ReformatAction."; //$NON-NLS-1$
26
private static final String JavaDoc TITLE = PREFIX + "title"; //$NON-NLS-1$
27

28     public ReformatAction(ITableMemoryViewTab viewTab)
29     {
30         super(DebugUIMessages.getString(TITLE));
31         fViewTab = viewTab;
32     }
33
34     /* (non-Javadoc)
35      * @see org.eclipse.jface.action.IAction#run()
36      */

37     public void run() {
38
39         if (fViewTab instanceof MemoryViewTab)
40         {
41             ((MemoryViewTab)fViewTab).packColumns();
42         }
43     }
44
45 }
46
Popular Tags