當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。