
org.eclipse.nebula.widgets.grid.internal.DefaultBottomLeftRenderer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nebula-grid Show documentation
Show all versions of nebula-grid Show documentation
Fork of Eclipse Nebula grid widget
The newest version!
/*******************************************************************************
* Copyright (c) 2006 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* [email protected] - initial API and implementation
*******************************************************************************/
package org.eclipse.nebula.widgets.grid.internal;
import org.eclipse.nebula.widgets.grid.AbstractRenderer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Point;
/**
* The renderer for the empty top left area when both column and row headers are
* visible.
*
* @author [email protected]
* @since 2.0.0
*/
public class DefaultBottomLeftRenderer extends AbstractRenderer {
/**
* {@inheritDoc}
*/
public Point computeSize(GC gc, int wHint, int hHint, Object value) {
return new Point(wHint, hHint);
}
/**
* {@inheritDoc}
*/
public void paint(GC gc, Object value) {
gc.setBackground(getDisplay().getSystemColor(
SWT.COLOR_WIDGET_BACKGROUND));
gc.fillRectangle(getBounds().x, getBounds().y, getBounds().width,
getBounds().height + 1);
gc.setForeground(getDisplay().getSystemColor(
SWT.COLOR_WIDGET_DARK_SHADOW));
gc.drawLine(getBounds().x, getBounds().y, getBounds().x
+ getBounds().width, getBounds().y);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy