当前位置: 首页>>代码示例>>Java>>正文


Java ObjectState.isHighlighted方法代码示例

本文整理汇总了Java中org.netbeans.api.visual.model.ObjectState.isHighlighted方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectState.isHighlighted方法的具体用法?Java ObjectState.isHighlighted怎么用?Java ObjectState.isHighlighted使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.netbeans.api.visual.model.ObjectState的用法示例。


在下文中一共展示了ObjectState.isHighlighted方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateUI

import org.netbeans.api.visual.model.ObjectState; //导入方法依赖的package包/类
public void updateUI (VMDConnectionWidget widget, ObjectState previousState, ObjectState state) {
    if (state.isHovered ())
        widget.setForeground (COLOR_HOVERED);
    else if (state.isSelected ())
        widget.setForeground (COLOR_SELECTED);
    else if (state.isHighlighted ())
        widget.setForeground (COLOR_HIGHLIGHTED);
    else if (state.isFocused ())
        widget.setForeground (COLOR_HOVERED);
    else
        widget.setForeground (COLOR_NORMAL);

    if (state.isSelected ()) {
        widget.setControlPointShape (PointShape.SQUARE_FILLED_SMALL);
        widget.setEndPointShape (PointShape.SQUARE_FILLED_BIG);
    } else {
        widget.setControlPointShape (PointShape.NONE);
        widget.setEndPointShape (POINT_SHAPE_IMAGE);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:21,代码来源:VMDOriginalColorScheme.java

示例2: updateUI

import org.netbeans.api.visual.model.ObjectState; //导入方法依赖的package包/类
public void updateUI (VMDConnectionWidget widget, ObjectState previousState, ObjectState state) {
    if (state.isSelected ())
        widget.setForeground (COLOR60_SELECT);
    else if (state.isHighlighted ())
        widget.setForeground (VMDOriginalColorScheme.COLOR_HIGHLIGHTED);
    else if (state.isHovered ()  ||  state.isFocused ())
        widget.setForeground (COLOR60_HOVER);
    else
        widget.setForeground (VMDOriginalColorScheme.COLOR_NORMAL);

    if (state.isSelected ()  ||  state.isHovered ()) {
        widget.setControlPointShape (PointShape.SQUARE_FILLED_SMALL);
        widget.setEndPointShape (PointShape.SQUARE_FILLED_BIG);
        widget.setControlPointCutDistance (0);
    } else {
        widget.setControlPointShape (PointShape.NONE);
        widget.setEndPointShape (POINT_SHAPE60_IMAGE);
        widget.setControlPointCutDistance (5);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:21,代码来源:VMDNetBeans60ColorScheme.java

示例3: notifyStateChanged

import org.netbeans.api.visual.model.ObjectState; //导入方法依赖的package包/类
@Override
public void notifyStateChanged(ObjectState oldState, ObjectState newState) {
   setForeground (getLineColor());
  
   if(newState.isHighlighted() && !oldState.isHighlighted()){
        this.setStroke(previewStroke);
        this.setVisible(true);
   } else {
       if(newState.isSelected()){
            this.setStroke(selectedStroke);
       } else {
            this.setStroke(defaultStroke);
       }
       if(this.isEdgeVisible()){
            this.setVisible(true);
       } else {
            this.setVisible(false);
       }
   }       
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:21,代码来源:EdgeWidget.java

示例4: notifyStateChanged

import org.netbeans.api.visual.model.ObjectState; //导入方法依赖的package包/类
@Override
protected void notifyStateChanged(ObjectState previousState, ObjectState state) {
    super.notifyStateChanged(previousState, state);

    Font font = this.figure.getDiagram().getFont();
    if (state.isSelected()) {
        font = this.figure.getDiagram().getBoldFont();
    }

    Color borderColor = Color.BLACK;
    Color innerBorderColor = getFigure().getColor();
    if (state.isHighlighted()) {
        innerBorderColor = borderColor = Color.BLUE;
    }

    middleWidget.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createLineBorder(borderColor, 1), BorderFactory.createLineBorder(innerBorderColor, 1)));
    for (LabelWidget labelWidget : labelWidgets) {
        labelWidget.setFont(font);
    }
    repaint();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:22,代码来源:FigureWidget.java

示例5: updateUI

import org.netbeans.api.visual.model.ObjectState; //导入方法依赖的package包/类
@Override
public void updateUI(IPEdgeWidget widget, ObjectState previousState, ObjectState state) {
    if (state.isHovered()) {
        widget.setForeground(COLOR_HOVERED);
    } else if (state.isSelected()) {
        widget.setForeground(COLOR_SELECTED);
    } else if (state.isHighlighted()) {
        widget.setForeground(COLOR_HIGHLIGHTED);
    } else if (state.isFocused()) {
        widget.setForeground(COLOR_HOVERED);
    } else {
        widget.setForeground(COLOR_NORMAL);
    }

    if (state.isSelected()) {
        widget.setControlPointShape(PointShape.SQUARE_FILLED_SMALL);
        widget.setEndPointShape(PointShape.SQUARE_FILLED_BIG);
    } else {
        widget.setControlPointShape(PointShape.NONE);
        widget.setEndPointShape(POINT_SHAPE_IMAGE);
    }
}
 
开发者ID:jeddict,项目名称:NBModeler,代码行数:23,代码来源:POriginalColorScheme.java

示例6: getLineColor

import org.netbeans.api.visual.model.ObjectState; //导入方法依赖的package包/类
public Color getLineColor (ObjectState state) {
    if (state.isHovered ())
        return COLOR_HOVERED;
    if (state.isSelected ())
        return COLOR_SELECTED;
    if (state.isHighlighted ()  || state.isFocused ())
        return COLOR_HIGHLIGHTED;
    return getForeground ();//Color.BLACK;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:DefaultLookFeel.java

示例7: getBackground

import org.netbeans.api.visual.model.ObjectState; //导入方法依赖的package包/类
public Paint getBackground (ObjectState state) {
    if (state.isHovered ())
        return COLOR_HOVERED;
    if (state.isSelected ())
        return COLOR_SELECTED;
    if (state.isHighlighted ()  || state.isFocused ())
        return COLOR_HIGHLIGHTED;
    return getBackground ();//Color.WHITE;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:DefaultLookFeel.java

示例8: updateUI

import org.netbeans.api.visual.model.ObjectState; //导入方法依赖的package包/类
@Override
public void updateUI(IPEdgeWidget widget, ObjectState previousState, ObjectState state) {
    if (state.isSelected()) {
        widget.setForeground(COLOR60_SELECT);
    } else if (state.isHighlighted()) {
        widget.setForeground(COLOR_HIGHLIGHTED);
    } else if (state.isHovered() || state.isFocused()) {
        widget.setForeground(COLOR60_HOVER);
    } else {
        widget.setForeground(COLOR_NORMAL);
    }

    if (state.isSelected()) {
        widget.setControlPointShape(PointShape.SQUARE_FILLED_SMALL);
        widget.setEndPointShape(PointShape.SQUARE_FILLED_BIG);
        widget.setControlPointCutDistance(0);
    } else if (state.isHovered()) {
        widget.setControlPointShape(PointShape.SQUARE_FILLED_SMALL);
        widget.setEndPointShape(PointShape.SQUARE_FILLED_BIG);
        widget.setControlPointCutDistance(0);
    } else {

        widget.setControlPointShape(PointShape.NONE);
        widget.setEndPointShape(PointShape.NONE);
        widget.setControlPointCutDistance(5);
    }
}
 
开发者ID:jeddict,项目名称:NBModeler,代码行数:28,代码来源:PNBColorScheme.java

示例9: updateUI

import org.netbeans.api.visual.model.ObjectState; //导入方法依赖的package包/类
@Override
public void updateUI(IPEdgeWidget widget, ObjectState previousState, ObjectState state) {
    if (state.isSelected()) {
        widget.setForeground(WIDGET_SELECT_BORDER_COLOR);
    } else if (state.isHighlighted()) {
        widget.setForeground(COLOR_HIGHLIGHTED);
    } else if (state.isHovered() || state.isFocused()) {
        widget.setForeground(WIDGET_HOVER_BORDER_COLOR);
    } else {
        widget.setForeground(WIDGET_BORDER_COLOR);
    }

    if (state.isSelected()) {
        widget.setControlPointShape(PointShape.SQUARE_FILLED_SMALL);
        widget.setEndPointShape(PointShape.SQUARE_FILLED_BIG);
        widget.setControlPointCutDistance(0);
    } else if (state.isHovered()) {
        widget.setControlPointShape(PointShape.SQUARE_FILLED_SMALL);
        widget.setEndPointShape(PointShape.SQUARE_FILLED_BIG);
        widget.setControlPointCutDistance(0);
    } else {

        widget.setControlPointShape(PointShape.NONE);
        widget.setEndPointShape(PointShape.NONE);
        widget.setControlPointCutDistance(5);
    }
}
 
开发者ID:jeddict,项目名称:NBModeler,代码行数:28,代码来源:PWoodColorScheme.java

示例10: getLineColor

import org.netbeans.api.visual.model.ObjectState; //导入方法依赖的package包/类
@Override
public Color getLineColor (ObjectState state) {
    if (state.isHovered ())
        return COLOR_HOVERED;
    if (state.isSelected ())
        return COLOR_SELECTED;
    if (state.isHighlighted ()  || state.isFocused ())
        return COLOR_HIGHLIGHTED;
    return Color.BLACK;
}
 
开发者ID:ProjectSWGCore,项目名称:ConversationScriptCreator,代码行数:11,代码来源:ConversationLookFeel.java

示例11: getBackground

import org.netbeans.api.visual.model.ObjectState; //导入方法依赖的package包/类
@Override
public Paint getBackground (ObjectState state) {
    if (state.isHovered ())
        return COLOR_HOVERED;
    if (state.isSelected ())
        return COLOR_SELECTED;
    if (state.isHighlighted ()  || state.isFocused ())
        return COLOR_HIGHLIGHTED;
    return Color.WHITE;
}
 
开发者ID:ProjectSWGCore,项目名称:ConversationScriptCreator,代码行数:11,代码来源:ConversationLookFeel.java

示例12: updateUI

import org.netbeans.api.visual.model.ObjectState; //导入方法依赖的package包/类
@Override
public void updateUI(PEdgeWidget widget, ObjectState previousState, ObjectState state) {
    if (state.isSelected()) {
        widget.setForeground(COLOR60_SELECT);
    } else if (state.isHighlighted()) {
        widget.setForeground(COLOR_HIGHLIGHTED);
    } else if (state.isHovered() || state.isFocused()) {
        widget.setForeground(COLOR60_HOVER);
    } else {
        widget.setForeground(COLOR_NORMAL);
    }

    if (state.isSelected()) {
        widget.setControlPointShape(PointShape.SQUARE_FILLED_SMALL);
        widget.setEndPointShape(PointShape.SQUARE_FILLED_BIG);
        widget.setControlPointCutDistance(0);
    } else if (state.isHovered()) {
        widget.setControlPointShape(PointShape.SQUARE_FILLED_SMALL);
        widget.setEndPointShape(PointShape.SQUARE_FILLED_BIG);
        widget.setControlPointCutDistance(0);
    } else {

        widget.setControlPointShape(PointShape.NONE);
        widget.setEndPointShape(PointShape.NONE);
        widget.setControlPointCutDistance(5);
    }
}
 
开发者ID:foxerfly,项目名称:Netbeans-JPA-Modeler,代码行数:28,代码来源:MultiValueEmbeddableFlowWidget.java

示例13: notifyStateChanged

import org.netbeans.api.visual.model.ObjectState; //导入方法依赖的package包/类
@Override
   protected void notifyStateChanged(ObjectState previousState, ObjectState state) {
       super.notifyStateChanged(previousState, state);

       Color borderColor = Color.BLACK;
Color innerBorderColor = getFigure().getColor();
       int thickness = 1;
       boolean repaint = false;
       Font f = font;
       if (state.isSelected() || state.isHighlighted()) {
           thickness = 2;
}
if(state.isSelected()) {
           f = boldFont;
	innerBorderColor = borderColor;
       } else {
}

       if (state.isHighlighted()) {
	innerBorderColor = borderColor = Color.BLUE;
	repaint = true;
       } else {
	repaint = true;
}

       if (state.isHovered() != previousState.isHovered()) {

	/*
           if (state.isHovered()) {
               diagramScene.addAllHighlighted(this.getFigure().getSource().getSourceNodesAsSet());
           } else {
               diagramScene.removeAllHighlighted(this.getFigure().getSource().getSourceNodesAsSet());
           }*/
           repaint = true;
       }

       if (state.isSelected() != previousState.isSelected()) {
           repaint = true;
       }

       if (repaint) {
           middleWidget.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createLineBorder(borderColor, 1), BorderFactory.createLineBorder(innerBorderColor, 1)));
           for (LabelWidget labelWidget : labelWidgets) {
               labelWidget.setFont(f);
           }
           repaint();
       }
   }
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:49,代码来源:FigureWidget.java


注:本文中的org.netbeans.api.visual.model.ObjectState.isHighlighted方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。