@Override protected Skin createDefaultSkin() { switch(skinType) { case YOTA2 : return new ClockSkin(Clock.this); case LCD : return new LcdClockSkin(Clock.this); case PEAR : return new PearClockSkin(Clock.this); case PLAIN : return new PlainClockSkin(Clock.this); case DB : return new DBClockSkin(Clock.this); case FAT : return new FatClockSkin(Clock.this); case ROUND_LCD : return new RoundLcdClockSkin(Clock.this); case SLIM : return new SlimClockSkin(Clock.this); case MINIMAL : return new MinimalClockSkin(Clock.this); case DIGITAL : return new DigitalClockSkin(Clock.this); case TEXT : return new TextClockSkin(Clock.this); case DESIGN : return new DesignClockSkin(Clock.this); case INDUSTRIAL: return new IndustrialClockSkin(Clock.this); case TILE : return new TileClockSkin(Clock.this); case DIGI : return new DigitalClockSkin(Clock.this); case CLOCK : default : return new ClockSkin(Clock.this); } }
public FGauge(final Gauge GAUGE, final GaugeDesign DESIGN, final GaugeBackground BACKGROUND) { getStylesheets().add(getClass().getResource("framed-gauge.css").toExternalForm()); getStyleClass().setAll("framed-gauge"); gauge = GAUGE; gaugeDesign = DESIGN; gaugeBackground = BACKGROUND; Skin skin = gauge.getSkin(); if (null != skin && gauge.getSkin().getClass() != GaugeSkin.class) { throw new RuntimeException("Please change Skin to GaugeSkin."); } init(); initGraphics(); registerListeners(); }
/** * {@inheritDoc} */ @Override protected Skin<?> createDefaultSkin() { return new BreadCrumbBarSkin<T>(this) { @Override protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) { double width = 0; for (Node node : getChildren()) { if (node instanceof BreadCrumbButton) { width = width - ((BreadCrumbButton) node).getArrowWidth(); } width += node.prefWidth(-1); } if (!getChildren().isEmpty()){ width = width + ((BreadCrumbButton) getChildren().get(0)).getArrowWidth(); } return width; } }; }
@Override protected Skin<?> createDefaultSkin() { Skin<?> defaultSkin = super.createDefaultSkin(); getChildren().add(0, g); widthProperty().addListener(e -> { baseLine.setStartX(10); baseLine.setEndX(getWidth() - 10); }); animationLine.setStroke(Color.web(Theme.BlueGreen.ACCENT_COLOR)); animationLine.setStrokeWidth(3f); // animationLine.setStroke(Color.web(Theme.BlueGreen.ACCENT_COLOR)); return defaultSkin; }
private static void selectFirstSuggestion(AutoCompletePopup<?> autoCompletionPopup) { Skin<?> skin = autoCompletionPopup.getSkin(); if (skin instanceof AutoCompletePopupSkin) { AutoCompletePopupSkin<?> au = (AutoCompletePopupSkin<?>) skin; ListView<?> li = (ListView<?>) au.getNode(); if (li.getItems() != null && !li.getItems().isEmpty()) { li.getSelectionModel().select(0); } } }
void print(List<Node> controls) { System.out.println("#### 컨트롤 개수 ####"); System.out.println(controls.size()); controls.forEach(n -> { if (n instanceof Control) { Skin<?> skin = ((Control) n).getSkin(); System.out.println("skin : " + skin); n.getPseudoClassStates(); } System.out.println(n); }); }
@Override protected Skin<?> createDefaultSkin() { MacroBaseSkin macroBaseSkin = new MacroBaseSkin(this); macroBaseSkin.setInitText(this.initText); //쿼리 실행시 로깅 macroBaseSkin.setOnExecutedQuery(str ->{ LOGGER.debug(str); }); //쿼리 실행결과 로깅 macroBaseSkin.setOnQueryDataUpdated((index, t) -> LOGGER.debug("{}, {}", index, t.toString())); return macroBaseSkin; }
/** * 매크로 동작을 멈춘다. * * @작성자 : KYJ * @작성일 : 2016. 8. 30. * @return */ public boolean stop() { Skin<?> skin = this.getSkin(); if (!(skin instanceof MacroBaseSkin)) { return false; } MacroBaseSkin mskin = (MacroBaseSkin) skin; return mskin.stop(); }
/** * Selects the first suggestion (if any), so the user can choose it by * pressing enter immediately. */ private void selectFirstSuggestion(AutoCompletePopup<?> autoCompletionPopup) { Skin<?> skin = autoCompletionPopup.getSkin(); if (skin instanceof AutoCompletePopupSkin) { AutoCompletePopupSkin<?> au = (AutoCompletePopupSkin<?>) skin; ListView<?> li = (ListView<?>) au.getNode(); if (li.getItems() != null && !li.getItems().isEmpty()) { li.getSelectionModel().select(0); } } }
@Override public void start(Stage primaryStage) throws Exception { Agenda agenda = new Agenda() { @Override public Skin<?> createDefaultSkin() { return new AgendaDaysFromDisplayedSkin(this); } }; // setup appointment groups final Map<String, Agenda.AppointmentGroup> lAppointmentGroupMap = new TreeMap<String, Agenda.AppointmentGroup>(); for (Agenda.AppointmentGroup lAppointmentGroup : agenda.appointmentGroups()) { lAppointmentGroupMap.put(lAppointmentGroup.getDescription(), lAppointmentGroup); } // accept new appointments agenda.newAppointmentCallbackProperty().set(new Callback<Agenda.LocalDateTimeRange, Agenda.Appointment>() { @Override public Agenda.Appointment call(LocalDateTimeRange dateTimeRange) { return new Agenda.AppointmentImplLocal().withStartLocalDateTime(dateTimeRange.getStartLocalDateTime()) .withEndLocalDateTime(dateTimeRange.getEndLocalDateTime()).withSummary("new").withDescription("new") .withAppointmentGroup(lAppointmentGroupMap.get("group01")); } }); BorderPane root = new BorderPane(agenda); root.getStylesheets() .add(AgendaSkinSwitcher.class .getResource("/jfxtras/internal/scene/control/skin/agenda/" + AgendaSkinSwitcher.class.getSimpleName() + ".css") .toExternalForm()); primaryStage.setScene(new Scene(root)); primaryStage.show(); }
@Override protected Skin createDefaultSkin() { switch (skinType) { case AMP : return new AmpSkin(Gauge.this); case BULLET_CHART : return new BulletChartSkin(Gauge.this); case DASHBOARD : return new DashboardSkin(Gauge.this); case FLAT : return new FlatSkin(Gauge.this); case INDICATOR : return new IndicatorSkin(Gauge.this); case KPI : return new KpiSkin(Gauge.this); case MODERN : return new ModernSkin(Gauge.this); case SIMPLE : return new SimpleSkin(Gauge.this); case SLIM : return new SlimSkin(Gauge.this); case SPACE_X : return new SpaceXSkin(Gauge.this); case QUARTER : return new QuarterSkin(Gauge.this); case HORIZONTAL : return new HSkin(Gauge.this); case VERTICAL : return new VSkin(Gauge.this); case LCD : return new LcdSkin(Gauge.this); case TINY : return new TinySkin(Gauge.this); case BATTERY : return new BatterySkin(Gauge.this); case LEVEL : return new LevelSkin(Gauge.this); case LINEAR : return new LinearSkin(Gauge.this); case DIGITAL : return new DigitalSkin(Gauge.this); case SIMPLE_DIGITAL : return new SimpleDigitalSkin(Gauge.this); case SECTION : return new SectionSkin(Gauge.this); case BAR : return new BarSkin(Gauge.this); case WHITE : return new WhiteSkin(Gauge.this); case CHARGE : return new ChargeSkin(Gauge.this); case SIMPLE_SECTION : return new SimpleSectionSkin(Gauge.this); case TILE_KPI : return new TileKpiSkin(Gauge.this); case TILE_TEXT_KPI : return new TileTextKpiSkin(Gauge.this); case TILE_SPARK_LINE: return new TileSparklineSkin(Gauge.this); case GAUGE : default : return new GaugeSkin(Gauge.this); } }
@Override protected Skin createDefaultSkin() { switch(skinType) { case SWITCH: return new SwitchSkin(CustomControl.this); case LED : default : return new LedSkin(CustomControl.this); } }
@Override public void updateLayout() { SegmentView.super.updateLayout(); final Skin<?> skin = getSkin(); if (skin != null) { ((JfxSegmentViewSkin) skin).redraw(); } }
@Override protected Skin<?> createDefaultSkin() { final ToggleButtonSkin buttonSkin = new ToggleButtonSkin(this); // Adding circleRipple as fist node of button nodes to be on the bottom this.getChildren().add(0, circleRipple); return buttonSkin; }
@Override protected Skin<?> createDefaultSkin() { final ButtonSkin buttonSkin = new ButtonSkin(this); // Adding circleRipple as fist node of button nodes to be on the bottom this.getChildren().add(0, circleRipple); return buttonSkin; }
/** * Selects the first suggestion (if any), so the user can choose it by * pressing enter immediately. * * @param autoCompletionPopup * the auto completion popup. */ private void selectFirstSuggestion(AutoCompletePopup<?> autoCompletionPopup) { final Skin<?> skin = autoCompletionPopup.getSkin(); if (skin instanceof AutoCompletePopupSkin) { final AutoCompletePopupSkin<?> au = (AutoCompletePopupSkin<?>) skin; final ListView<?> li = (ListView<?>) au.getNode(); if ((li.getItems() != null) && ! li.getItems().isEmpty()) { li.getSelectionModel().select(0); } } }
@Override protected Skin<?> createDefaultSkin() { return new CustomTextFieldSkin(this) { @Override public ObjectProperty<Node> leftProperty() { return CustomTextField.this.leftProperty(); } @Override public ObjectProperty<Node> rightProperty() { return CustomTextField.this.rightProperty(); } }; }
@Override protected Skin<?> createDefaultSkin() { return new CustomTextFieldSkin(this) { @Override public ObjectProperty<Node> leftProperty() { return CustomPasswordField.this.leftProperty(); } @Override public ObjectProperty<Node> rightProperty() { return CustomPasswordField.this.rightProperty(); } }; }
public final void filterUI(){ GridPane gridLEFT = new GridPane(); // Labels Label stopwordsLabel = new Label("Stop words removal"); UIUtils.setSize(stopwordsLabel, Main.columnWidthLEFT/2, 24); Label resizingLabel = new Label("Resizing"); UIUtils.setSize(resizingLabel, Main.columnWidthLEFT/2, 24); gridLEFT.add(stopwordsLabel,0,0); gridLEFT.add(new Rectangle(0,3),0,1); gridLEFT.add(resizingLabel,0,2); // Values stopwordLists = new StopwordSets(); stopwordListsCheckComboBox = new CheckComboBox<>(stopwordLists.availableSets); stopwordListsCheckComboBox.setStyle("-fx-font-size: 12px;"); stopwordListsCheckComboBox.skinProperty().addListener(new ChangeListener<Skin>() { @Override public void changed(ObservableValue<? extends Skin> observable, Skin oldValue, Skin newValue) { if(oldValue==null && newValue!=null){ CheckComboBoxSkin skin = (CheckComboBoxSkin)newValue; ComboBox combo = (ComboBox)skin.getChildren().get(0); combo.setPrefWidth(Main.columnWidthLEFT/2); combo.setMaxWidth(Double.MAX_VALUE); } } }); // stopwordListsCheckComboBox.setMaxWidth(Double.MAX_VALUE); // UIUtils.setSize(stopwordListsCheckComboBox,Main.columnWidthLEFT/2, 24); gridLEFT.add(stopwordListsCheckComboBox,1,0); resizeSlider = new RangeSlider(); resizeSlider.setBlockIncrement(0.1); UIUtils.setSize(resizeSlider,Main.columnWidthLEFT/2, 24); resizeSlider.resize(Main.columnWidthLEFT/2, 24); gridLEFT.add(resizeSlider,1,2); HBox filterDatasetBOTH = new HBox(5); filterDatasetBOTH.getChildren().addAll(gridLEFT,createFilterButton()); grid.add(filterDatasetBOTH,0,11); }
private TreeView<Node> createTree(TreeItem<Node> root) { return new TreeView<Node>(root) { @Override protected Skin createDefaultSkin() { return new CustomTreeViewSkin<>(this); } }; }
/** * Returns the color of the given item. * @param item The item for which the color should be returned * @return */ public Color getItemColor(WeightedTreeItem<T> item) { Skin<?> skin = this.getSkin(); //System.out.println(skin); Color color = null; if(skin instanceof SunburstViewSkin){ //System.out.println("is SunburstViewSkin"); color =((SunburstViewSkin) skin).getItemColor(item); } return color; }
@Override public void style(final ToggleButton button) { super.style(button); button.setSkin(new AquaToggleButtonSkin(button)); Skin<?> skin = button.getSkin(); if (skin != null && skin instanceof AquaButtonSkin) { ((AquaButtonSkin) skin).iconProperty().setValue(icon); } }
@Override public void style(final Button button) { super.style(button); button.setSkin(new AquaButtonSkin(button)); Skin<?> skin = button.getSkin(); if (skin != null && skin instanceof AquaButtonSkin) { ((AquaButtonSkin) skin).iconProperty().setValue(icon); } }
@Override public boolean isSettable(TextField n) { Skin<?> skin = n.getSkin(); if (skin != null && skin instanceof AquaTextFieldSkin) { return ((AquaTextFieldSkin) skin).showSearchIcon == null || !((AquaTextFieldSkin) skin).showSearchIcon.isBound(); } return false; }
@SuppressWarnings("unchecked") @Override public StyleableProperty<Boolean> getStyleableProperty(TextField n) { Skin<?> skin = n.getSkin(); if (skin != null && skin instanceof AquaTextFieldSkin) { return (StyleableProperty<Boolean>) ((AquaTextFieldSkin) skin).showSearchIconProperty(); } return null; }
@Override public boolean isSettable(Button n) { Skin<?> skin = n.getSkin(); if (skin != null && skin instanceof AquaButtonSkin) { return ((AquaButtonSkin) skin).icon == null || !((AquaButtonSkin) skin).icon.isBound(); } return false; }
@SuppressWarnings("unchecked") @Override public StyleableProperty<MacOSDefaultIcons> getStyleableProperty(Button n) { Skin<?> skin = n.getSkin(); if (skin != null && skin instanceof AquaButtonSkin) { return (StyleableProperty<MacOSDefaultIcons>) ((AquaButtonSkin) skin).iconProperty(); } return null; }
/** {@inheritDoc} */ @Override protected Skin<?> createDefaultSkin() { return new ToggleSwitchSkin(this); }
/** * Don't worry about this, it's necessary but useless. */ @Override protected Skin<FXSpace> createDefaultSkin() { return new FXSpaceSkin(this); }
@Override protected Skin<?> createDefaultSkin() { return new EditableLabelSkin(this); }
@Override protected Skin<?> createDefaultSkin() { return new SwitchSkin(this); }
@Override protected Skin<?> createDefaultSkin() { return new LoadSkin(this); }
@Override protected Skin<?> createDefaultSkin() { return new LevelBarSkin(this); }
@Override protected Skin<?> createDefaultSkin() { return new TransformerSkin(this); }
@Override protected Skin<?> createDefaultSkin() { return new AlarmSkin(this); }
@Override protected Skin<?> createDefaultSkin() { return new DisplaySkin(this); }
@Override protected Skin<?> createDefaultSkin() { return new GeneratorSkin(this); }
@Override protected Skin<?> createDefaultSkin() { return new IntroPaneSkin(this); }