GEF 改变选中框的颜色
2014-11-13 23:33
357 查看
GEF 改变选中框的颜色
此方法的父类为moveHandle
public calss aaaMocveHandle extends basdsf
{
@Override
protected void initialize() {
setOpaque(false);
setBorder(new LineBorder(1){
public void paint(IFigure figure, Graphics graphics, Insets insets) {
tempRect.setBounds(getPaintRectangle(figure, insets));
if (getWidth() % 2 == 1) {
tempRect.width--;
tempRect.height--;
}
tempRect.shrink(getWidth() / 2, getWidth() / 2);
graphics.setLineWidth(getWidth());
//选中边框颜色
graphics.setForegroundColor(ColorConstants.blue);
//用椭圆形替代矩形
graphics.drawRectangle(tempRect);
}
});
setCursor(Cursors.SIZEALL);
}
此方法的父类为moveHandle
public calss aaaMocveHandle extends basdsf
{
@Override
protected void initialize() {
setOpaque(false);
setBorder(new LineBorder(1){
public void paint(IFigure figure, Graphics graphics, Insets insets) {
tempRect.setBounds(getPaintRectangle(figure, insets));
if (getWidth() % 2 == 1) {
tempRect.width--;
tempRect.height--;
}
tempRect.shrink(getWidth() / 2, getWidth() / 2);
graphics.setLineWidth(getWidth());
//选中边框颜色
graphics.setForegroundColor(ColorConstants.blue);
//用椭圆形替代矩形
graphics.drawRectangle(tempRect);
}
});
setCursor(Cursors.SIZEALL);
}
相关文章推荐
- WPF中ListView如何改变选中条背景颜色
- CSS改变网页中鼠标选中文字背景颜色例子
- winform中GridView控件在选中一行后改变选中行的背景颜色
- 点击DataGrid的行选中checkbox并改变行的颜色
- cell 能够响应 select,但是选中后的颜色又不发生改变的方法
- android 在 button、textview等控件按下和选中的时候改变颜色或图片实现方法
- 改变选中Treeview的节点的背景颜色
- android自定义radiobutton样式文字颜色随选中状态而改变
- android改变图片选中颜色
- tableView cell 选中颜色的改变
- android 自定义 radiobutton 文字颜色随选中状态而改变
- 改变listview中item选中时文字的颜色
- android 自定义 radiobutton 文字颜色随选中状态而改变
- javascript使用onclick事件改变选中行的颜色
- android上改变listView的选中颜色
- WPF DataGrid 选中行颜色不改变问题
- JS实现页面table鼠标移动改变tr行颜色,单击tr选中复选框功能
- iOS tabBar颜色渲染和改变选中时图片
- css3 改变默认选中文本背景色和文本颜色
- Android改变ListView选中行字体颜色