KickJava   Java API By Example, From Geeks To Geeks.

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


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

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

23 public class ReformatAction extends Action {
24     
25     private AbstractBaseTableRendering fRendering;
26     
27     public ReformatAction(AbstractBaseTableRendering rendering)
28     {
29         super(DebugUIMessages.ReformatAction_title);
30         PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugUIConstants.PLUGIN_ID + ".ReformatAction_context"); //$NON-NLS-1$
31
fRendering = rendering;
32     }
33
34     /* (non-Javadoc)
35      * @see org.eclipse.jface.action.IAction#run()
36      */

37     public void run() {
38         fRendering.resizeColumnsToPreferredSize();
39     }
40
41 }
42
Popular Tags