Package limelight.util

Examples of limelight.util.Box


  @Override
  public void doExpansion(Panel thePanel)
  {
    PanelBase panel = (PanelBase)thePanel;
    Box bounds = panel.getParent().getChildConsumableBounds();
    panel.setLocation(bounds.x, bounds.y);
    panel.setSize(bounds.width, bounds.height);
  }
View Full Code Here


  {
    if(shouldPaintSpecialBorder(panel))
    {
      try
      {
        Box bounds = panel.getMarginedBounds();
        normalBorder.draw(graphics, bounds.x, bounds.y, bounds.width, bounds.height);
        if(panel.hasFocus())
          focusedBorder.draw(graphics, bounds.x, bounds.y, bounds.width, bounds.height);
      }
      catch(Exception e)
View Full Code Here

  public void paint(Graphics2D graphics, limelight.ui.model.text.TextModel model)
  {
    if(!model.isCaretOn() || model.hasSelection())
      return;

    Box caret = model.getCaretShape();
    graphics.setColor(model.getContainer().getStyle().getCompiledTextColor().getColor());
    graphics.fill(caret);
  }
View Full Code Here

  protected void markCursorRegionAsDirty()
  {
    Scene rootPanel = getRoot();
    if(rootPanel != null)
    {
      Box caret = model.getCaretShape().translated(getAbsoluteLocation());
      rootPanel.addDirtyRegion(caret);
    }
  }
View Full Code Here

  }

  public Box getConsumableBounds()
  {
    if(consumableBounds == null)
      consumableBounds = new Box(0, 0, getWidth(), getHeight());
    return consumableBounds;
  }
View Full Code Here

    this.orientation = orientation;
    if(getOrientation() == VERTICAL)
    {
      preferredGirth = width = GIRTH;
      setSize(preferredGirth, 50);
      sliderBounds = new Box(0, 0, preferredGirth, 0);
    }
    else
    {
      preferredGirth = height = GIRTH;
      setSize(50, preferredGirth);
      sliderBounds = new Box(0, 0, 0, preferredGirth);
    }

    getEventHandler().add(MousePressedEvent.class, mouseProcessor);
    getEventHandler().add(MouseReleasedEvent.class, mouseProcessor);
    getEventHandler().add(MouseDraggedEvent.class, mouseProcessor);
View Full Code Here

      initiateUnitIncrement(scrollBar.getUnitIncrement());
    else if(scrollBar.getDecreasingButtonBounds().contains(mouseLocation))
      initiateUnitIncrement(-scrollBar.getUnitIncrement());
    else if(scrollBar.getTrackBounds().contains(mouseLocation))
    {
      Box sliderBounds = scrollBar.getSliderBounds();
      if(isAfterSlider(mouseLocation, sliderBounds))
        initiateBlockIncrement(scrollBar.getBlockIncrement());
      else if(isBeforeSlider(mouseLocation, sliderBounds))
        initiateBlockIncrement(-scrollBar.getBlockIncrement());
      else if(scrollBar.getSliderBounds().contains(mouseLocation))
View Full Code Here

  private void processBlockIncremementDrag()
  {
    if(scrollBar.getTrackBounds().contains(mouseLocation))
    {
      Box sliderBounds = scrollBar.getSliderBounds();
      final boolean shouldReverseBlockIncrement = (repeater.getScrollDelta() < 0 && isAfterSlider(mouseLocation, sliderBounds))
                                               || (repeater.getScrollDelta() > 0 && isBeforeSlider(mouseLocation, sliderBounds));
      if(shouldReverseBlockIncrement)
        repeater.setScrollDelta(repeater.getScrollDelta() * -1);

 
View Full Code Here

      focusPatch = NinePatch.load(Images.load("button_focus.9.png"));
    }

    public void paint(Graphics2D graphics, PaintablePanel panel)
    {
      final Box bounds = panel.getMarginedBounds();
      if(panel.hasFocus())
        focusPatch.draw(graphics, bounds.x, bounds.y, bounds.width, bounds.height);

      final ButtonPanel button = (ButtonPanel) ((PropPanel) panel).getTextAccessor(); // TODO MDM Yuk!
      if(button.isBeingPressed)
View Full Code Here

    return MIN_GEM_SIZE;
  }

  public void paintOn(Graphics2D graphics, ScrollBarPanel scrollBar)
  {
    Box bounds = scrollBar.getBounds();
    if(scrollBar.isHorizontal())
      drawHorizontally(graphics, bounds, scrollBar);
    else
      drawVertically(graphics, bounds, scrollBar);
  }
View Full Code Here

TOP

Related Classes of limelight.util.Box

Copyright © 2018 www.massapicom. 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.