Examples of Side


Examples of cpw.mods.fml.relauncher.Side

 
  public void mountGun(EntityPlayer player, boolean mounting)
  {
    if(player == null)
      return;
    Side side = worldObj.isRemote ? Side.CLIENT : Side.SERVER;
    if(PlayerHandler.getPlayerData(player, side) == null)
      return;
    if(mounting)
    {
      gunner = player;
View Full Code Here

Examples of cpw.mods.fml.relauncher.Side

  private static Side getEffectiveSide() {
    Thread thr = Thread.currentThread();
    if(threadSideMap.containsKey(thr)) {
      return threadSideMap.get(thr);
    }
    Side side = getEffectiveSide(thr);
    if(threadSideMap.size() > 50) {
      threadSideMap.clear();
    }
    threadSideMap.put(thr, side);
    return side;
View Full Code Here

Examples of hu.bme.mit.ftsrg.jointstates.core.Side

    // ObjectOutputStream oos = new ObjectOutputStream(os);
    int parentJointStatId;

    // networking
    parentJointStatId = is.read();
    Side destination = (Side) ois.readObject();
    int message = is.read();

    // generating the possible transition to add
    JointStateTransition newTransition = new JointStateTransition(message, nextJointStateId);
View Full Code Here

Examples of javafx.geometry.Side

        timeline.getKeyFrames().add(new KeyFrame(duration, func, keyValue));
        return timeline;
    }

    private boolean isHorizontal() {
        Side tabPosition = getSkinnable().getSide();
        return Side.TOP.equals(tabPosition) || Side.BOTTOM.equals(tabPosition);
    }
View Full Code Here

Examples of javafx.geometry.Side

    }

    @Override protected void layoutChildren(final double x, final double y,
            final double w, final double h) {
        TabPane tabPane = getSkinnable();
        Side tabPosition = tabPane.getSide();

        double headerHeight = snapSize(tabHeaderArea.prefHeight(-1));
        double tabsStartX = tabPosition.equals(Side.RIGHT)? x + w - headerHeight : x;
        double tabsStartY = tabPosition.equals(Side.BOTTOM)? y + h - headerHeight : y;

        if (tabPosition.equals(tabPosition.TOP)) {
            tabHeaderArea.resize(w, headerHeight);
            tabHeaderArea.relocate(tabsStartX, tabsStartY);
            tabHeaderArea.getTransforms().clear();
            tabHeaderArea.getTransforms().add(new Rotate(getRotation(tabPosition.TOP)));
        } else if (tabPosition.equals(tabPosition.BOTTOM)) {
            tabHeaderArea.resize(w, headerHeight);
            tabHeaderArea.relocate(w, tabsStartY - headerHeight);
            tabHeaderArea.getTransforms().clear();
            tabHeaderArea.getTransforms().add(new Rotate(getRotation(tabPosition.BOTTOM), 0, headerHeight));
        } else if (tabPosition.equals(tabPosition.LEFT)) {
            tabHeaderArea.resize(h, headerHeight);
            tabHeaderArea.relocate(tabsStartX + headerHeight, h - headerHeight);
            tabHeaderArea.getTransforms().clear();
            tabHeaderArea.getTransforms().add(new Rotate(getRotation(tabPosition.LEFT), 0, headerHeight));
        } else if (tabPosition.equals(tabPosition.RIGHT)) {
            tabHeaderArea.resize(h, headerHeight);
            tabHeaderArea.relocate(tabsStartX, y - headerHeight);
            tabHeaderArea.getTransforms().clear();
            tabHeaderArea.getTransforms().add(new Rotate(getRotation(tabPosition.RIGHT), 0, headerHeight));
        }

        tabHeaderAreaClipRect.setX(0);
        tabHeaderAreaClipRect.setY(0);
        if (isHorizontal()) {
            tabHeaderAreaClipRect.setWidth(w);
        } else {
            tabHeaderAreaClipRect.setWidth(h);
        }
        tabHeaderAreaClipRect.setHeight(headerHeight);

        // ==================================
        // position the tab content for the selected tab only
        // ==================================
        // if the tabs are on the left, the content needs to be indented
        double contentStartX = 0;
        double contentStartY = 0;

        if (tabPosition.equals(tabPosition.TOP)) {
            contentStartX = x;
            contentStartY = y + headerHeight;
            if (isFloatingStyleClass()) {
                // This is to hide the top border content
                contentStartY -= 1;
            }
        } else if (tabPosition.equals(tabPosition.BOTTOM)) {
            contentStartX = x;
            contentStartY = y;
            if (isFloatingStyleClass()) {
                // This is to hide the bottom border content
                contentStartY = 1;
            }
        } else if (tabPosition.equals(tabPosition.LEFT)) {
            contentStartX = x + headerHeight;
            contentStartY = y;
            if (isFloatingStyleClass()) {
                // This is to hide the left border content
                contentStartX -= 1;
            }
        } else if (tabPosition.equals(tabPosition.RIGHT)) {
            contentStartX = x;
            contentStartY = y;
            if (isFloatingStyleClass()) {
                // This is to hide the right border content
                contentStartX = 1;
View Full Code Here

Examples of javafx.geometry.Side

                            scrollToSelectedTab(selectedTabOffset, previousSelectedTabOffset);
                        }
                        isSelectingTab = false;
                    }

                    Side tabPosition = getSkinnable().getSide();
                    double tabBackgroundHeight = snapSize(prefHeight(-1));
                    double tabX = (tabPosition.equals(Side.LEFT) || tabPosition.equals(Side.BOTTOM)) ?
                        snapSize(getWidth()) - getScrollOffset() : getScrollOffset();

                    updateHeaderClip();
                    for (Node node : getChildren()) {
                        TabHeaderSkin tabHeader = (TabHeaderSkin)node;
                        // size and position the header relative to the other headers
                        double tabHeaderPrefWidth = snapSize(tabHeader.prefWidth(-1));
                        double tabHeaderPrefHeight = snapSize(tabHeader.prefHeight(-1));
                        tabHeader.resize(tabHeaderPrefWidth, tabHeaderPrefHeight);
                        // This ensures that the tabs are located in the correct position
                        // when there are tabs of differing heights.
                        double startY = tabPosition.equals(Side.BOTTOM) ?
                            0 : tabBackgroundHeight - tabHeaderPrefHeight - snappedBottomInset();
                        if (tabPosition.equals(Side.LEFT) || tabPosition.equals(Side.BOTTOM)) {
                            // build from the right
                            tabX -= tabHeaderPrefWidth;
                            tabHeader.relocate(tabX, startY);
                        } else {
                            // build from the left
View Full Code Here

Examples of javafx.geometry.Side

            getChildren().addAll(headerBackground, headersRegion, controlButtons);

        }

        private void updateHeaderClip() {
            Side tabPosition = getSkinnable().getSide();

            double x = 0;
            double y = 0;
            double clipWidth = 0;
            double clipHeight = 0;
            double maxWidth = 0;
            double shadowRadius = 0;
            double clipOffset = firstTabIndent();
            double controlButtonPrefWidth = snapSize(controlButtons.prefWidth(-1));
            double headersPrefWidth = snapSize(headersRegion.prefWidth(-1));
            double headersPrefHeight = snapSize(headersRegion.prefHeight(-1));

            // Add the spacer if isShowTabsMenu is true.
            if (controlButtonPrefWidth > 0) {
                controlButtonPrefWidth = controlButtonPrefWidth + SPACER;
            }

            if (headersRegion.getEffect() instanceof DropShadow) {
                DropShadow shadow = (DropShadow)headersRegion.getEffect();
                shadowRadius = shadow.getRadius();
            }

            maxWidth = snapSize(getWidth()) - controlButtonPrefWidth - clipOffset;
            if (tabPosition.equals(Side.LEFT) || tabPosition.equals(Side.BOTTOM)) {
                if (headersPrefWidth < maxWidth) {
                    clipWidth = headersPrefWidth + shadowRadius;
                } else {
                    x = headersPrefWidth - maxWidth;
                    clipWidth = maxWidth + shadowRadius;
View Full Code Here

Examples of javafx.geometry.Side

        // ----- End of control button scrolling support
        private void scroll(double d) {
            if (tabsFit()) {
                return;
            }
            Side tabPosition = getSkinnable().getSide();
            double headerPrefWidth = snapSize(headersRegion.prefWidth(-1));
            double controlTabWidth = snapSize(controlButtons.prefWidth(-1));
            double max = getWidth() - headerPrefWidth - controlTabWidth;
            double delta = tabPosition.equals(Side.LEFT) || tabPosition.equals(Side.BOTTOM) ? -d : d;
            double newOffset = getScrollOffset() + delta;
            setScrollOffset(newOffset >= 0 ? 0.0F : (newOffset <= max ? max : newOffset));
        }
View Full Code Here

Examples of javafx.geometry.Side

           
            double startX = 0;
            double startY = 0;
            double controlStartX = 0;
            double controlStartY = 0;
            Side tabPosition = getSkinnable().getSide();

            if (tabPosition.equals(Side.TOP)) {
                if (getWidth() > headersPrefWidth + leftInset || alignment == HPos.LEFT) {
                    startX = snapSize(leftInset);
                } else if (alignment == HPos.CENTER) {
                    startX = snapSize(leftInset * 2 + (headersPrefWidth - getWidth()) / 2);
                } else if (alignment == HPos.RIGHT) {
                    startX = snapSize(leftInset * 3 + (headersPrefWidth - getWidth()));
                }
                startY = tabBackgroundHeight - headersPrefHeight - snapSize(bottomInset);
                controlStartX = w - btnWidth + snapSize(leftInset);
                controlStartY = snapSize(getHeight()) - controlButtons.getControlTabHeight() - snapSize(bottomInset);
            } else if (tabPosition.equals(Side.RIGHT)) {
                if (getWidth() > headersPrefWidth + topInset || alignment == HPos.LEFT) {
                    startX = snapSize(topInset);
                } else if (alignment == HPos.RIGHT) {
                    startX = snapSize(topInset * 3 + (headersPrefWidth - getWidth()));
                } else if (alignment == HPos.CENTER) {
                    startX = snapSize(topInset * 2 + (headersPrefWidth - getWidth()) / 2);
                }
                startY = tabBackgroundHeight - headersPrefHeight - snapSize(leftInset);
                controlStartX = w - btnWidth + snapSize(topInset);
                controlStartY = snapSize(getHeight()) - controlButtons.getControlTabHeight() - snapSize(leftInset);
            } else if (tabPosition.equals(Side.BOTTOM)) {
                if (getWidth() > headersPrefWidth + leftInset || alignment == HPos.RIGHT) {
                    startX = snapSize(leftInset);
                } else if (alignment == HPos.CENTER) {
                    startX = snapSize(leftInset / 3 - (headersPrefWidth - getWidth()) / 2);
                } else if (alignment == HPos.LEFT) {
                    startX = snapSize(getWidth() - leftInset - headersPrefWidth);
                }
                startY = tabBackgroundHeight - headersPrefHeight - snapSize(topInset);
                controlStartX = snapSize(rightInset);
                controlStartY = snapSize(getHeight()) - controlButtons.getControlTabHeight() - snapSize(topInset);
            } else if (tabPosition.equals(Side.LEFT)) {
                if (getWidth() > headersPrefWidth + topInset || alignment == HPos.RIGHT) {
                    startX = snapSize(topInset);
                } else if(alignment == HPos.LEFT){
                    startX = snapSize(getWidth()) - headersPrefWidth - snapSize(getInsets().getTop());
                } else if(alignment == HPos.CENTER ) {
View Full Code Here

Examples of javafx.geometry.Side

            });   

            // initialize pseudo-class state
            pseudoClassStateChanged(SELECTED_PSEUDOCLASS_STATE, tab.isSelected());
            pseudoClassStateChanged(DISABLED_PSEUDOCLASS_STATE, tab.isDisable());
            final Side side = getSkinnable().getSide();
            pseudoClassStateChanged(TOP_PSEUDOCLASS_STATE, (side == Side.TOP));
            pseudoClassStateChanged(RIGHT_PSEUDOCLASS_STATE, (side == Side.RIGHT));
            pseudoClassStateChanged(BOTTOM_PSEUDOCLASS_STATE, (side == Side.BOTTOM));
            pseudoClassStateChanged(LEFT_PSEUDOCLASS_STATE, (side == Side.LEFT));
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.