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


Java Path.setManaged方法代码示例

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


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

示例1: StyledTextPane

import javafx.scene.shape.Path; //导入方法依赖的package包/类
public StyledTextPane()
{
	textField = new CTextFlow();
	
	caret = new Path();
	FX.style(caret, CARET);
	caret.setManaged(false);
	caret.setStroke(Color.BLACK);
	
	getChildren().add(textField);
	
	caretTimeline = new Timeline();
	caretTimeline.setCycleCount(Animation.INDEFINITE);
	// TODO property
	updateBlinkRate(Duration.millis(500));
	
	// FIX allow custom handlers
	new StyledTextPaneMouseController(this);
}
 
开发者ID:andy-goryachev,项目名称:FxEditor,代码行数:20,代码来源:StyledTextPane.java

示例2: TestTextFlowWindow

import javafx.scene.shape.Path; //导入方法依赖的package包/类
public TestTextFlowWindow()
{
	super("TestTextFlowWindow");
	
	setTitle("TextFlow Test");
	setSize(600, 200);
	
	info = new Text();
	
	highlight = new Path();
	highlight.setManaged(false);
	highlight.setStroke(null);
	highlight.setFill(Color.YELLOW);
	
	caret = new Path();
	caret.setManaged(false);
	caret.setStroke(Color.BLACK);
	
	setTop(tf());
	setBottom(new CTextFlow(info));
}
 
开发者ID:andy-goryachev,项目名称:FxEditor,代码行数:22,代码来源:TestTextFlowApp.java

示例3: VFlow

import javafx.scene.shape.Path; //导入方法依赖的package包/类
public VFlow(FxEditor ed)
{
	this.editor = ed;
	
	clip = new Rectangle();
	
	selectionHighlight = new Path();
	FX.style(selectionHighlight, FxEditor.HIGHLIGHT);
	selectionHighlight.setManaged(false);
	selectionHighlight.setStroke(null);
	selectionHighlight.setFill(Color.rgb(255, 255, 0, 0.25));
	
	caretPath = new Path();
	FX.style(caretPath, FxEditor.CARET);
	caretPath.setManaged(false);
	caretPath.setStroke(Color.BLACK);
	
	caretAnimation = new Timeline();
	caretAnimation.setCycleCount(Animation.INDEFINITE);
	
	getChildren().addAll(selectionHighlight, caretPath);
	setClip(clip);
	
	caretPath.visibleProperty().bind(new BooleanBinding()
	{
		{
			bind(caretVisible, editor.displayCaret, editor.focusedProperty(), editor.disabledProperty(), suppressBlink);
		}

		protected boolean computeValue()
		{
			return (isCaretVisible() || suppressBlink.get()) && editor.isDisplayCaret() && editor.isFocused() && (!editor.isDisabled());
		}
	});
}
 
开发者ID:andy-goryachev,项目名称:ReqTraq,代码行数:36,代码来源:VFlow.java

示例4: VFlow

import javafx.scene.shape.Path; //导入方法依赖的package包/类
public VFlow(FxEditor ed)
{
	this.editor = ed;
	
	FX.style(this, FxEditor.VFLOW);
	
	clip = new Rectangle();
	
	caretPath = new Path();
	FX.style(caretPath, FxEditor.CARET);
	caretPath.setManaged(false);
	caretPath.setStroke(Color.BLACK);

	caretLineHighlight = new Path();
	FX.style(caretLineHighlight, FxEditor.CARET_LINE_HIGHLIGHT);
	caretLineHighlight.setManaged(false);
	caretLineHighlight.setStroke(null);
	caretLineHighlight.setFill(Color.rgb(255, 0, 255, 0.02));

	selectionHighlight = new Path();
	FX.style(selectionHighlight, FxEditor.SELECTION_HIGHLIGHT);
	selectionHighlight.setManaged(false);
	selectionHighlight.setStroke(null);
	selectionHighlight.setFill(Color.rgb(255, 255, 0, 0.25));
			
	caretAnimation = new Timeline();
	caretAnimation.setCycleCount(Animation.INDEFINITE);
	
	getChildren().addAll(selectionHighlight, caretLineHighlight, caretPath);
	setClip(clip);
	
	caretPath.visibleProperty().bind(new BooleanBinding()
	{
		{
			bind(caretVisible, editor.displayCaretProperty, editor.focusedProperty(), editor.disabledProperty(), suppressBlink);
		}

		protected boolean computeValue()
		{
			return (isCaretVisible() || suppressBlink.get()) && editor.isDisplayCaret() && editor.isFocused() && (!editor.isDisabled());
		}
	});
}
 
开发者ID:andy-goryachev,项目名称:FxEditor,代码行数:44,代码来源:VFlow.java

示例5: initGraphics

import javafx.scene.shape.Path; //导入方法依赖的package包/类
@Override protected void initGraphics() {
    // Set initial size
    if (Double.compare(clock.getPrefWidth(), 0.0) <= 0 || Double.compare(clock.getPrefHeight(), 0.0) <= 0 ||
        Double.compare(clock.getWidth(), 0.0) <= 0 || Double.compare(clock.getHeight(), 0.0) <= 0) {
        if (clock.getPrefWidth() > 0 && clock.getPrefHeight() > 0) {
            clock.setPrefSize(clock.getPrefWidth(), clock.getPrefHeight());
        } else {
            clock.setPrefSize(PREFERRED_WIDTH, PREFERRED_HEIGHT);
        }
    }

    sectionsAndAreasCanvas = new Canvas(PREFERRED_WIDTH, PREFERRED_HEIGHT);
    sectionsAndAreasCtx    = sectionsAndAreasCanvas.getGraphicsContext2D();

    tickCanvas = new Canvas(PREFERRED_WIDTH, PREFERRED_HEIGHT);
    tickCtx    = tickCanvas.getGraphicsContext2D();

    alarmPane = new Pane();

    hour  = new Path();
    hour.setFillRule(FillRule.EVEN_ODD);
    hour.setStroke(null);
    hour.getTransforms().setAll(hourRotate);

    minute = new Path();
    minute.setFillRule(FillRule.EVEN_ODD);
    minute.setStroke(null);
    minute.getTransforms().setAll(minuteRotate);

    second = new Path();
    second.setFillRule(FillRule.EVEN_ODD);
    second.setStroke(null);
    second.getTransforms().setAll(secondRotate);
    second.setVisible(clock.isSecondsVisible());
    second.setManaged(clock.isSecondsVisible());

    dropShadow = new DropShadow();
    dropShadow.setColor(Color.rgb(0, 0, 0, 0.25));
    dropShadow.setBlurType(BlurType.TWO_PASS_BOX);
    dropShadow.setRadius(0.015 * PREFERRED_WIDTH);
    dropShadow.setOffsetY(0.015 * PREFERRED_WIDTH);

    shadowGroupHour   = new Group(hour);
    shadowGroupMinute = new Group(minute);
    shadowGroupSecond = new Group(second);

    shadowGroupHour.setEffect(clock.getShadowsEnabled() ? dropShadow : null);
    shadowGroupMinute.setEffect(clock.getShadowsEnabled() ? dropShadow : null);
    shadowGroupSecond.setEffect(clock.getShadowsEnabled() ? dropShadow : null);

    title = new Text("");
    title.setVisible(clock.isTitleVisible());
    title.setManaged(clock.isTitleVisible());

    dateText = new Text("");
    dateText.setVisible(clock.isDateVisible());
    dateText.setManaged(clock.isDateVisible());

    dateNumber = new Text("");
    dateNumber.setVisible(clock.isDateVisible());
    dateNumber.setManaged(clock.isDateVisible());

    text = new Text("");
    text.setVisible(clock.isTextVisible());
    text.setManaged(clock.isTextVisible());

    pane = new Pane(sectionsAndAreasCanvas, tickCanvas, alarmPane, title, dateText, dateNumber, text, shadowGroupHour, shadowGroupMinute, shadowGroupSecond);
    pane.setBorder(new Border(new BorderStroke(clock.getBorderPaint(), BorderStrokeStyle.SOLID, new CornerRadii(1024), new BorderWidths(clock.getBorderWidth()))));
    pane.setBackground(new Background(new BackgroundFill(clock.getBackgroundPaint(), new CornerRadii(1024), Insets.EMPTY)));

    getChildren().setAll(pane);
}
 
开发者ID:HanSolo,项目名称:Medusa,代码行数:73,代码来源:PearClockSkin.java

示例6: initGraphics

import javafx.scene.shape.Path; //导入方法依赖的package包/类
@Override protected void initGraphics() {
    // Set initial size
    if (Double.compare(clock.getPrefWidth(), 0.0) <= 0 || Double.compare(clock.getPrefHeight(), 0.0) <= 0 ||
        Double.compare(clock.getWidth(), 0.0) <= 0 || Double.compare(clock.getHeight(), 0.0) <= 0) {
        if (clock.getPrefWidth() > 0 && clock.getPrefHeight() > 0) {
            clock.setPrefSize(clock.getPrefWidth(), clock.getPrefHeight());
        } else {
            clock.setPrefSize(PREFERRED_WIDTH, PREFERRED_HEIGHT);
        }
    }

    sectionsAndAreasCanvas = new Canvas(PREFERRED_WIDTH, PREFERRED_HEIGHT);
    sectionsAndAreasCtx    = sectionsAndAreasCanvas.getGraphicsContext2D();

    tickCanvas = new Canvas(PREFERRED_WIDTH, PREFERRED_HEIGHT);
    tickCtx    = tickCanvas.getGraphicsContext2D();

    alarmPane = new Pane();

    hour  = new Path();
    hour.setFillRule(FillRule.EVEN_ODD);
    hour.setStroke(null);
    hour.getTransforms().setAll(hourRotate);

    minute = new Path();
    minute.setFillRule(FillRule.EVEN_ODD);
    minute.setStroke(null);
    minute.getTransforms().setAll(minuteRotate);

    second = new Path();
    second.setFillRule(FillRule.EVEN_ODD);
    second.setStroke(null);
    second.getTransforms().setAll(secondRotate);
    second.setVisible(clock.isSecondsVisible());
    second.setManaged(clock.isSecondsVisible());

    centerDot = new Circle();
    centerDot.setFill(Color.WHITE);

    dropShadow = new DropShadow();
    dropShadow.setColor(Color.rgb(0, 0, 0, 0.25));
    dropShadow.setBlurType(BlurType.TWO_PASS_BOX);
    dropShadow.setRadius(0.015 * PREFERRED_WIDTH);
    dropShadow.setOffsetY(0.015 * PREFERRED_WIDTH);

    shadowGroupHour   = new Group(hour);
    shadowGroupMinute = new Group(minute);
    shadowGroupSecond = new Group(second);

    shadowGroupHour.setEffect(clock.getShadowsEnabled() ? dropShadow : null);
    shadowGroupMinute.setEffect(clock.getShadowsEnabled() ? dropShadow : null);
    shadowGroupSecond.setEffect(clock.getShadowsEnabled() ? dropShadow : null);

    title = new Text("");
    title.setVisible(clock.isTitleVisible());
    title.setManaged(clock.isTitleVisible());

    dateText = new Text("");
    dateText.setVisible(clock.isDateVisible());
    dateText.setManaged(clock.isDateVisible());

    dateNumber = new Text("");
    dateNumber.setVisible(clock.isDateVisible());
    dateNumber.setManaged(clock.isDateVisible());

    text = new Text("");
    text.setVisible(clock.isTextVisible());
    text.setManaged(clock.isTextVisible());

    pane = new Pane(sectionsAndAreasCanvas, tickCanvas, alarmPane, title, dateText, dateNumber, text, shadowGroupMinute, shadowGroupHour, shadowGroupSecond, centerDot);
    pane.setBorder(new Border(new BorderStroke(clock.getBorderPaint(), BorderStrokeStyle.SOLID, new CornerRadii(1024), new BorderWidths(clock.getBorderWidth()))));
    pane.setBackground(new Background(new BackgroundFill(clock.getBackgroundPaint(), new CornerRadii(1024), Insets.EMPTY)));

    getChildren().setAll(pane);
}
 
开发者ID:HanSolo,项目名称:Medusa,代码行数:76,代码来源:IndustrialClockSkin.java

示例7: initGraphics

import javafx.scene.shape.Path; //导入方法依赖的package包/类
@Override protected void initGraphics() {
    // Set initial size
    if (Double.compare(clock.getPrefWidth(), 0.0) <= 0 || Double.compare(clock.getPrefHeight(), 0.0) <= 0 ||
        Double.compare(clock.getWidth(), 0.0) <= 0 || Double.compare(clock.getHeight(), 0.0) <= 0) {
        if (clock.getPrefWidth() > 0 && clock.getPrefHeight() > 0) {
            clock.setPrefSize(clock.getPrefWidth(), clock.getPrefHeight());
        } else {
            clock.setPrefSize(PREFERRED_WIDTH, PREFERRED_HEIGHT);
        }
    }

    sectionsAndAreasCanvas = new Canvas(PREFERRED_WIDTH, PREFERRED_HEIGHT);
    sectionsAndAreasCtx    = sectionsAndAreasCanvas.getGraphicsContext2D();

    tickCanvas = new Canvas(PREFERRED_WIDTH, PREFERRED_HEIGHT);
    tickCtx    = tickCanvas.getGraphicsContext2D();

    alarmPane = new Pane();

    hour  = new Path();
    hour.setFillRule(FillRule.EVEN_ODD);
    hour.setStroke(null);
    hour.getTransforms().setAll(hourRotate);

    minute = new Path();
    minute.setFillRule(FillRule.EVEN_ODD);
    minute.setStroke(null);
    minute.getTransforms().setAll(minuteRotate);

    second = new Path();
    second.setFillRule(FillRule.EVEN_ODD);
    second.setStroke(null);
    second.getTransforms().setAll(secondRotate);
    second.setVisible(clock.isSecondsVisible());
    second.setManaged(clock.isSecondsVisible());

    knob = new Circle(PREFERRED_WIDTH * 0.5, PREFERRED_HEIGHT * 0.5, PREFERRED_WIDTH * 0.0148448);
    knob.setStroke(null);

    dropShadow = new DropShadow();
    dropShadow.setColor(Color.rgb(0, 0, 0, 0.25));
    dropShadow.setBlurType(BlurType.TWO_PASS_BOX);
    dropShadow.setRadius(0.015 * PREFERRED_WIDTH);
    dropShadow.setOffsetY(0.015 * PREFERRED_WIDTH);

    shadowGroupHour   = new Group(hour);
    shadowGroupMinute = new Group(minute);
    shadowGroupSecond = new Group(second, knob);

    shadowGroupHour.setEffect(clock.getShadowsEnabled() ? dropShadow : null);
    shadowGroupMinute.setEffect(clock.getShadowsEnabled() ? dropShadow : null);
    shadowGroupSecond.setEffect(clock.getShadowsEnabled() ? dropShadow : null);

    title = new Text("");
    title.setVisible(clock.isTitleVisible());
    title.setManaged(clock.isTitleVisible());

    dateNumber = new Text("");
    dateNumber.setVisible(clock.isDateVisible());
    dateNumber.setManaged(clock.isDateVisible());

    text = new Text("");
    text.setVisible(clock.isTextVisible());
    text.setManaged(clock.isTextVisible());

    pane = new Pane(sectionsAndAreasCanvas, tickCanvas, alarmPane, title, dateNumber, text, shadowGroupHour, shadowGroupMinute, shadowGroupSecond);
    pane.setBorder(new Border(new BorderStroke(clock.getBorderPaint(), BorderStrokeStyle.SOLID, new CornerRadii(1024), new BorderWidths(clock.getBorderWidth()))));
    pane.setBackground(new Background(new BackgroundFill(clock.getBackgroundPaint(), new CornerRadii(1024), Insets.EMPTY)));

    getChildren().setAll(pane);
}
 
开发者ID:HanSolo,项目名称:Medusa,代码行数:72,代码来源:PlainClockSkin.java


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