documentation inherited from interface
499702
public void paint (Graphics2D gfx, int x, int y)
    {
        gfx.drawImage(_image, x, y, null);
    }
625147
public void init(Record thisFile, String userIdFieldName, boolean bFirstTimeOnly)
    {
        super.init(thisFile);
        this.userIdFieldName = userIdFieldName;
        m_bFirstTimeOnly = bFirstTimeOnly;
    }
1021301
@Override
    protected void doInitInputLocation(WstxInputData reader)
    {
        reader.mCurrInputProcessed = mInputProcessed;
        reader.mCurrInputRow = mInputRow;
        reader.mCurrInputRowStart = mInputRowStart;
    }
218225
function() {
        this.io = µBlock.CompiledLineIO;
        this.blockId = undefined;
        this.block = undefined;
        this.stringifier = this.io.serialize;
        this.blocks = new Map();
        this.properties = new Map();
    }
81384
@SuppressWarnings("unchecked")
    protected void buildObject() {

        final Class<?> objectType = ClassUtility.findGenericClass(this.getClass(), OBJECT_EXCLUDED_CLASSES);

        // If not generic type is defined for Object, object field will remain null
        if (objectType != null) {
            Object keyPart = null;
            boolean found = false;
            for (int i = 0; !found && i < getListKeyPart().size(); i++) {
                keyPart = getListKeyPart().get(i);

                if (objectType.isAssignableFrom(keyPart.getClass())) {

                    this.object = (O) keyPart;
                    found = true;
                }
            }

            if (this.object == null) {
                // Build the current default object by reflection if it hadn't been provided into the key without any constructor parameters
                try {
                    this.object = (O) ClassUtility.buildGenericType(this.getClass(), OBJECT_EXCLUDED_CLASSES);
                } catch (final CoreException ce) {
                    LOGGER.log(UIMessages.CREATION_FAILURE, ce, this.getClass().getName());
                    throw new CoreRuntimeException(ce);
                }
            }
        }
    }
44760
private void populateCurrentKeyValue() throws IOException, InterruptedException {
    currentKey = delegateReader.getCurrentKey();
    currentValue = delegateReader.getCurrentValue();
    ++recordsRead;
  }
249401
public void persist() throws Exception {
		if (!mapping.equals(initialMapping)) {
			state.clear();
			for (Map.Entry<W, W> window : mapping.entrySet()) {
				state.add(new Tuple2<>(window.getKey(), window.getValue()));
			}
		}
	}
1250460
private void init() {
        if (stops.isEmpty()) return;

        double minFraction = Collections.min(stops.keySet());
        double maxFraction = Collections.max(stops.keySet());

        if (Double.compare(minFraction, 0) > 0) { stops.put(0.0, new Stop(0.0, stops.get(minFraction).getColor())); }
        if (Double.compare(maxFraction, 1) < 0) { stops.put(1.0, new Stop(1.0, stops.get(maxFraction).getColor())); }
    }
812046
public void define() {
		staticInitializer = null;
		haveLookedForStaticInitializer = false;
		// DEFAULT METHODS - remove the if
		if (!typeDescriptor.isInterface()) {
			try {
				dispatcherClass = reloadableType.typeRegistry.defineClass(dispatcherName, dispatcher, false);
			}
			catch (RuntimeException t) {
				// TODO check for something strange.  something to do with the file detection misbehaving, see the same file attempted to be reloaded twice...
				if (t.getMessage().indexOf("duplicate class definition") == -1) {
					throw t;
				}
				else {
					t.printStackTrace();
				}
			}
		}
		try {
			executorClass = reloadableType.typeRegistry.defineClass(executorName, executor, false);
		}
		catch (RuntimeException t) {
			// TODO check for something strange.  something to do with the file detection misbehaving, see the same file attempted to be reloaded twice...
			if (t.getMessage().indexOf("duplicate class definition") == -1) {
				throw t;
			}
			else {
				t.printStackTrace();
			}
		}
		// DEFAULT METHODS - remove the if
		if (!typeDescriptor.isInterface()) {
			try {
				dispatcherInstance = dispatcherClass.newInstance();
			}
			catch (InstantiationException e) {
				throw new RuntimeException("Unable to build dispatcher class instance", e);
			}
			catch (IllegalAccessException e) {
				throw new RuntimeException("Unable to build dispatcher class instance", e);
			}
		}
	}
1152563
@Override
    public void save(T item) {
        Serializable idValue = getOrGenerateIdValue(item);
        save(idValue, item);
    }
1027123
private void init() {
        _minValue                           = 0;
        _maxValue                           = 100;
        value                               = new DoublePropertyBase(_minValue) {
            @Override protected void invalidated() {
                final double VALUE = get();
                withinSpeedLimit = !(Instant.now().minusMillis(getAnimationDuration()).isBefore(lastCall));
                lastCall = Instant.now();
                if (isAnimated() && withinSpeedLimit) {
                    long animationDuration = isReturnToZero() ? (long) (0.2 * getAnimationDuration()) : getAnimationDuration();
                    timeline.stop();

                    final KeyValue KEY_VALUE;
                    if (NeedleBehavior.STANDARD == getNeedleBehavior()) {
                        KEY_VALUE = new KeyValue(currentValue, VALUE, Interpolator.SPLINE(0.5, 0.4, 0.4, 1.0));
                    } else { // Optimized only useful in a gauge where the angle range is 360 deg and the shorter way has to be calculated.
                        double ov         = getOldValue();
                        double min        = getMinValue();
                        double max        = getMaxValue();
                        double halfRange  = getRange() * 0.5;
                        double cv         = getCurrentValue();
                        double delta      = VALUE - getCurrentValue();

                        if (delta < -halfRange) {
                            double kv1 = max - cv;
                            double kv2 = VALUE;
                        } else if (delta > halfRange) {

                        }

                        double tmpValue;

                        if (Math.abs(VALUE - ov) > getRange() * 0.5) {
                            if (ov < VALUE) {
                                tmpValue = min - max + VALUE;
                            } else {
                                tmpValue = ov + max - ov + min + VALUE - getRange();
                            }
                            KEY_VALUE = new KeyValue(currentValue, tmpValue, Interpolator.SPLINE(0.5, 0.4, 0.4, 1.0));
                        } else {
                            if (cv < min) currentValue.set(max + cv);
                            KEY_VALUE = new KeyValue(currentValue, VALUE, Interpolator.SPLINE(0.5, 0.4, 0.4, 1.0));
                        }
                    }
                    final KeyFrame KEY_FRAME = new KeyFrame(Duration.millis(animationDuration), KEY_VALUE);
                    timeline.getKeyFrames().setAll(KEY_FRAME);
                    timeline.play();
                } else {
                    currentValue.set(VALUE);
                    fireUpdateEvent(FINISHED_EVENT);
                }
                if (isAveragingEnabled()) { movingAverage.addData(new Data(VALUE)); }
            }
            @Override public void set(final double VALUE) {
                super.set(VALUE);
                fireUpdateEvent(VALUE_EVENT);
            }
            @Override public Object getBean() { return Gauge.this; }
            @Override public String getName() { return "value"; }
        };
        oldValue                            = new SimpleDoubleProperty(Gauge.this, "oldValue", value.get());
        currentValue                        = new DoublePropertyBase(value.get()) {
            @Override protected void invalidated() {
                final double VALUE = get();
                if (isCheckThreshold()) {
                    double thrshld = getThreshold();
                    if (formerValue.get() < thrshld && VALUE > thrshld) {
                        fireEvent(EXCEEDED_EVENT);
                    } else if (formerValue.get() > thrshld && VALUE < thrshld) {
                        fireEvent(UNDERRUN_EVENT);
                    }
                }
                if (VALUE < getMinMeasuredValue()) {
                    setMinMeasuredValue(VALUE);
                } else if (VALUE > getMaxMeasuredValue()) {
                    setMaxMeasuredValue(VALUE);
                }
                formerValue.set(VALUE);
            }
            @Override public void set(final double VALUE) { super.set(VALUE); }
            @Override public Object getBean() { return Gauge.this; }
            @Override public String getName() { return "currentValue";}
        };
        formerValue                         = new SimpleDoubleProperty(Gauge.this, "formerValue", value.get());
        _range                              = _maxValue - _minValue;
        _threshold                          = _maxValue;
        _title                              = "";
        _subTitle                           = "";
        _unit                               = "";
        _averagingEnabled                   = false;
        _averagingPeriod                    = 10;
        movingAverage                       = new MovingAverage(_averagingPeriod);
        sections                            = FXCollections.observableArrayList();
        areas                               = FXCollections.observableArrayList();
        tickMarkSections                    = FXCollections.observableArrayList();
        tickLabelSections                   = FXCollections.observableArrayList();
        markers                             = FXCollections.observableArrayList();

        _startFromZero                      = false;
        _returnToZero                       = false;
        _zeroColor                          = DARK_COLOR;
        _minMeasuredValue                   = _maxValue;
        _maxMeasuredValue                   = _minValue;
        _minMeasuredValueVisible            = false;
        _maxMeasuredValueVisible            = false;
        _oldValueVisible                    = false;
        _valueVisible                       = true;
        _backgroundPaint                    = Color.TRANSPARENT;
        _borderPaint                        = Color.TRANSPARENT;
        _borderWidth                        = 1;
        _foregroundPaint                    = Color.TRANSPARENT;
        _knobColor                          = Color.rgb(204, 204, 204);
        _knobType                           = KnobType.STANDARD;
        _knobPosition                       = Pos.CENTER;
        _knobVisible                        = true;
        _animated                           = false;
        animationDuration                   = 800;
        _startAngle                         = 320;
        _angleRange                         = 280;
        _angleStep                          = _angleRange / _range;
        _autoScale                          = true;
        _shadowsEnabled                     = false;
        _barEffectEnabled                   = false;
        _scaleDirection                     = ScaleDirection.CLOCKWISE;
        _tickLabelLocation                  = TickLabelLocation.INSIDE;
        _tickLabelOrientation               = TickLabelOrientation.HORIZONTAL;
        _tickLabelColor                     = DARK_COLOR;
        _tickMarkColor                      = DARK_COLOR;
        _majorTickMarkColor                 = DARK_COLOR;
        _majorTickMarkLengthFactor          = 0.42;
        _majorTickMarkWidthFactor           = 0.275;
        _mediumTickMarkColor                = DARK_COLOR;
        _mediumTickMarkLengthFactor         = 0.41;
        _mediumTickMarkWidthFactor          = 0.175;
        _minorTickMarkColor                 = DARK_COLOR;
        _minorTickMarkLengthFactor          = 0.40;
        _minorTickMarkWidthFactor           = 0.1125;
        _majorTickMarkType                  = TickMarkType.LINE;
        _mediumTickMarkType                 = TickMarkType.LINE;
        _minorTickMarkType                  = TickMarkType.LINE;
        _locale                             = Locale.US;
        _decimals                           = 1;
        _tickLabelDecimals                  = 0;
        _needleType                         = NeedleType.STANDARD;
        _needleShape                        = NeedleShape.ANGLED;
        _needleSize                         = NeedleSize.STANDARD;
        _needleBehavior                     = NeedleBehavior.STANDARD;
        _needleColor                        = Color.rgb(200, 0, 0);
        _needleBorderColor                  = Color.TRANSPARENT;
        _barColor                           = BRIGHT_COLOR;
        _barBorderColor                     = Color.TRANSPARENT;
        _barBackgroundColor                 = DARK_COLOR;
        _lcdDesign                          = LcdDesign.STANDARD;
        _lcdFont                            = LcdFont.DIGITAL_BOLD;
        _ledColor                           = Color.RED;
        _ledType                            = LedType.STANDARD;
        _titleColor                         = DARK_COLOR;
        _subTitleColor                      = DARK_COLOR;
        _unitColor                          = DARK_COLOR;
        _valueColor                         = DARK_COLOR;
        _thresholdColor                     = Color.CRIMSON;
        _averageColor                       = Color.MAGENTA;
        _checkSectionsForValue              = false;
        _checkAreasForValue                 = false;
        _checkThreshold                     = false;
        _innerShadowEnabled                 = false;
        _thresholdVisible                   = false;
        _averageVisible                     = false;
        _sectionsVisible                    = false;
        _sectionsAlwaysVisible              = false;
        _sectionTextVisible                 = false;
        _sectionIconsVisible                = false;
        _highlightSections                  = false;
        _areasVisible                       = false;
        _areaTextVisible                    = false;
        _areaIconsVisible                   = false;
        _highlightAreas                     = false;
        _tickMarkSectionsVisible            = false;
        _tickLabelSectionsVisible           = false;
        _markersVisible                     = false;
        _tickLabelsVisible                  = true;
        _onlyFirstAndLastTickLabelVisible   = false;
        _majorTickMarksVisible              = true;
        _mediumTickMarksVisible             = true;
        _minorTickMarksVisible              = true;
        _tickMarkRingVisible                = false;
        _majorTickSpace                     = 10;
        _minorTickSpace                     = 1;
        _lcdVisible                         = false;
        _lcdCrystalEnabled                  = false;
        _ledVisible                         = false;
        _ledOn                              = false;
        _ledBlinking                        = false;
        _orientation                        = Orientation.HORIZONTAL;
        _gradientBarEnabled                 = false;
        _customTickLabelsEnabled            = false;
        customTickLabels                    = FXCollections.observableArrayList();
        _customTickLabelFontSize            = 18;
        _interactive                        = false;
        _buttonTooltipText                  = "";
        _keepAspect                         = true;
        _customFontEnabled                  = false;
        _customFont                         = Fonts.robotoRegular(12);
        _alert                              = false;
        _alertMessage                       = "";
        _smoothing                          = false;
        formatString                        = "%.2f";

        originalMinValue                    = -Double.MAX_VALUE;
        originalMaxValue                    = Double.MAX_VALUE;
        originalThreshold                   = Double.MAX_VALUE;
        lastCall                            = Instant.now();
        timeline                            = new Timeline();
        timeline.setOnFinished(e -> {
            if (isReturnToZero() && Double.compare(currentValue.get(), 0.0) != 0.0) {
                final KeyValue KEY_VALUE2 = new KeyValue(value, 0, Interpolator.SPLINE(0.5, 0.4, 0.4, 1.0));
                final KeyFrame KEY_FRAME2 = new KeyFrame(Duration.millis((long) (0.8 * getAnimationDuration())), KEY_VALUE2);
                timeline.getKeyFrames().setAll(KEY_FRAME2);
                timeline.play();
            }
            fireUpdateEvent(FINISHED_EVENT);
        });
    }
953704
@Override
	public void init() {
		int count = 10485760;
		RandomAccessFile randomAccessFile;
		String realPath = FileHandlerUtil.generateOutputFilePath(path);

		try {
			if (FileHandlerUtil.isFileAlreadyExists(realPath)) {
				randomAccessFile = new RandomAccessFile(realPath, CoreConstants.READ_WRITE);
			} else {
				randomAccessFile = new RandomAccessFile(new File(realPath), CoreConstants.READ_WRITE);
			}
			// move the cursor to the end of the file
			randomAccessFile.seek(randomAccessFile.length());

			 out = randomAccessFile.getChannel().map(FileChannel.MapMode.READ_WRITE, 0, count);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
1103902
function () {
			var el = this.constructor.unwrapElement(this.element),
				bindings = this._bindings;
			if( bindings ) {
				(bindings.user || []).forEach(function (value) {
					value(el);
				});
				canReflect.eachKey(bindings.control || {}, function (value) {
					value(el);
				});
				canReflect.eachKey(bindings.readyComputes || {}, function(value) {
					canReflect.offValue(value.compute, value.handler, "mutate");
				});
			}
			// Adds bindings.
			this._bindings = {user: [], control: {}, readyComputes: {}};
		}
1097648
private void genGetAllMethod(SourceWriter sw, JMethod[] methods,
      TreeLogger treeLogger) {
    sw.println("public DeferredSelector[] getAllSelectors() {return ds;}");
    sw.println("private final DeferredSelector[] ds = new DeferredSelector[] {");
    sw.indent();
    for (JMethod m : methods) {
      Selector selectorAnnotation = m.getAnnotation(Selector.class);
      if (selectorAnnotation == null) {
        continue;
      }
      String selector = selectorAnnotation.value();

      sw.println("new DeferredSelector() {");
      sw.indent();
      sw
          .println("public String getSelector() { return \"" + selector
              + "\"; }");
      sw
          .println("public NodeList<Element> runSelector(Node ctx) { return " +
              (m.getName() + (m.getParameters().length == 0 ? "()" : "(ctx)")) +
              ("NodeList".equals(m.getReturnType().getSimpleSourceName()) ? "" : ".get()") + ";}"
          );
      sw.outdent();
      sw.println("},");
    }
    sw.outdent();
    sw.println("};");
  }
1114218
public void actionPerformed(ActionEvent ev) {

        if (ev.getSource() instanceof TextField) {
            saveTable();

            return;
        }

        String   s = ev.getActionCommand();
        MenuItem i = new MenuItem();

        if (s == null) {
            if (ev.getSource() instanceof MenuItem) {
                i = (MenuItem) ev.getSource();
                s = i.getLabel();
            }
        }

        if (s == null) {}

        if (s.equals("Start Transfer") || s.equals("ReStart Transfer")) {
            bStart.setLabel("ReStart Transfer");
            bStart.invalidate();

            CurrentTransfer = 0;
            CurrentAlter    = 0;

            transfer();
        } else if (s.equals("Continue Transfer")) {
            transfer();
        } else if (s.equals("Start Dump") || s.equals("Start Restore")) {
            CurrentTransfer = 0;
            CurrentAlter    = 0;

            transfer();
        } else if (s.equals("Quit")) {
            exit();
        } else if (s.indexOf("Select Schema") >= 0) {
            String[] selection = lTable.getSelectedItems();

            if ((selection == null) || (selection.length == 0)) {
                return;
            }

            if (iSelectionStep == Transfer.SELECT_SOURCE_SCHEMA) {
                sSourceSchemas = selection;
            } else {
                sDestSchema = selection[0];
            }

            if (iTransferMode == TRFM_DUMP) {
                iSelectionStep = Transfer.SELECT_SOURCE_TABLES;
            } else {
                iSelectionStep++;
            }

            ProcessNextStep();
        } else if (s.indexOf("Select Catalog") >= 0) {
            String selection = lTable.getSelectedItem();

            if ((selection == null) || (selection.equals(""))) {
                return;
            }

            if (iSelectionStep == Transfer.SELECT_SOURCE_CATALOG) {
                sSourceCatalog = selection;
                sSourceSchemas = null;
            } else {
                sDestCatalog = selection;
                sDestSchema  = null;

                try {
                    targetDb.setCatalog(sDestCatalog);
                } catch (Exception ex) {
                    trace("Catalog " + sDestCatalog
                          + " could not be selected in the target database");

                    sDestCatalog = null;
                }
            }

            iSelectionStep++;

            ProcessNextStep();
        } else if (s.equals("Insert 10 rows only")) {
            iMaxRows = 10;
        } else if (s.equals("Insert 1000 rows only")) {
            iMaxRows = 1000;
        } else if (s.equals("Insert all rows")) {
            iMaxRows = 0;
        } else if (s.equals("Load Settings...")) {
            FileDialog f = new FileDialog(fMain, "Load Settings",
                                          FileDialog.LOAD);

            f.show();

            String file = f.getDirectory() + f.getFile();

            if (file != null) {
                LoadPrefs(file);
                displayTable(tCurrent);
            }
        } else if (s.equals("Save Settings...")) {
            FileDialog f = new FileDialog(fMain, "Save Settings",
                                          FileDialog.SAVE);

            f.show();

            String file = f.getDirectory() + f.getFile();

            if (file != null) {
                SavePrefs(file);
            }
        } else if (s.equals("Exit")) {
            windowClosing(null);
        }
    }
203762
@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        graphMonitor = new Graph.Monitor() {
            @Override
            public void onInject(Object target) {
                if (controller != null && target == MvcFragment.this) {
                    controller.view = MvcFragment.this;
                }
            }

            @Override
            public void onRelease(Object target) {
            }
        };
        Mvc.graph().registerMonitor(graphMonitor);

        eventRegister = new EventRegister(this);

        if (savedInstanceState == null) {
            lastOrientation = getResources().getConfiguration().orientation;
        } else {
            lastOrientation = savedInstanceState.getInt(STATE_LAST_ORIENTATION);
        }

        if (getParentFragment() == null) {
            setRetainInstance(true);
        }

        injectDependencies();
    }
60655
public void retrieveValue()
    {
        BaseField field = this.getOwner();
        RecordOwner recordOwner = field.getRecord().getRecordOwner();
        if (recordOwner instanceof ComponentParent)
        {
            String strValue = recordOwner.getProperty(field.getFieldName());
            if (strValue != null)
            {
                boolean[] rgbEnabled = field.setEnableListeners(false);
                field.setString(strValue, DBConstants.DISPLAY, DBConstants.INIT_MOVE);
                field.setEnableListeners(rgbEnabled);
            }
            m_recordOwnerCache = (ComponentParent)recordOwner;
        }
    }