Package org.jdesktop.swingx

Examples of org.jdesktop.swingx.MultiSplitLayout$Node


   * Checks for dividers where two adjacent nodes are not separated by a visible divider
   * @param comp the component that has just been shown
   */
  private void restoreDividers( Component comp )
  {
    MultiSplitLayout layout = (MultiSplitLayout)splitPane.getLayout();
    MultiSplitLayout.Node node = layout.getNodeForComponent( comp );
    if ( node != null ) {
      node.setVisible( true );
      MultiSplitLayout.Split p = node.getParent();
      p.restoreDividers( p );
    }
    layout.setFloatingDividers( false );
 
View Full Code Here


   * @param dockable the dockable object containing the XDockingPanel instance
   * that is to be zoomed/shown
   */
  public void swapViews( XDockable dockable )
  {
    MultiSplitLayout multiSplitLayout = (MultiSplitLayout)multiSplitPane.getLayout();
    if ( !zoomPanel.isVisible()) {
      // If the name is non null the dividers are also removed
      multiSplitLayout.setRemoveDividers( false );
      zoomPanel.add( dockable.dockedContainer, BorderLayout.CENTER );
      cardManager.show( this, "ZoomPane" );
      dockable.dockedContainer.setVisible( true );
      zoomedDockable = dockable;
    }
    else {
      // Reset the panel name
      multiSplitLayout.setRemoveDividers( true );
      multiSplitPane.add( dockable.dockedContainer, dockable.dockedContainer.getConstraint() );
      cardManager.show( this, "MultiSplitPane" );
      zoomedDockable = null;
    }
    revalidate();
View Full Code Here

   * view is not zoomed then this method has no effect.
   */
  public XDockingPanel restoreViews()
  {
    if ( zoomPanel.isVisible()) {
      MultiSplitLayout multiSplitLayout = (MultiSplitLayout)multiSplitPane.getLayout();
      XDockingPanel dockedContainer = null;
      if ( zoomPanel.getComponentCount() > 0 ) {
        dockedContainer = ((XDockingPanel)zoomPanel.getComponent( 0 ));
        // Reset the panel name
        multiSplitLayout.setRemoveDividers( true );
        multiSplitPane.add( dockedContainer, dockedContainer.getConstraint() );
      }
      cardManager.show( this, "MultiSplitPane" );
      if ( zoomedDockable != null )
        zoomedDockable.header.setZoomState( zoomedDockable.header.ZOOM );
View Full Code Here

    for (Way way : waysById.values()) {
     
      List<WayNode> origWayNodes = way.getWayNodes();
      List<OSMNode> wayNodes = new ArrayList<OSMNode>(origWayNodes.size());
      for (WayNode origWayNode : origWayNodes) {
        Node origNode = nodesById.get(origWayNode.getNodeId());
        if (origNode != null) {
          wayNodes.add(nodeMap.get(origNode));
        }
      }
     
View Full Code Here

    for (Way way : waysById.values()) {
     
      List<WayNode> origWayNodes = way.getWayNodes();
      List<OwnNode> wayNodes = new ArrayList<OwnNode>(origWayNodes.size());
      for (WayNode origWayNode : origWayNodes) {
        Node origNode = nodesById.get(origWayNode.getNodeId());
        wayNodes.add(nodeMap.get(origNode));
      }
     
      OwnWay ownWay = new OwnWay(tagGroupForEntity(way), wayNodes);
     
View Full Code Here

        CommonEntityData entityData = new CommonEntityData(id, version, timestamp, osmuser,
                changeset, tags);
        if (type.equals(OSMUtils.nodeType())) {
            Point pt = (Point) feature.getDefaultGeometryProperty().getValue();
            entity = new Node(entityData, pt.getY(), pt.getX());

        } else {
            List<WayNode> nodes = Lists.newArrayList();
            String nodesString = (String) feature.getAttribute("nodes");
            for (String s : nodesString.split(";")) {
View Full Code Here

  /* save */

  @Test
  public void saveNode() {
    // Setup
    Node node = OsmDataBuilder.buildSampleNode();

    // Action
    entityDao.save(node);
    refresh(INDEX_NAME);

View Full Code Here

  }

  @Test
  public void saveAll() throws InterruptedException {
    // Setup
    Node node1 = OsmDataBuilder.buildSampleNode(1);
    Node node2 = OsmDataBuilder.buildSampleNode(2);

    // Action
    entityDao.saveAll(Arrays.asList(new Entity[] { node1, node2 }));
    refresh(INDEX_NAME);
View Full Code Here

public class ESNodeUTest {

  @Test
  public void buildFromNodeEntity() {
    // Setup
    Node node = mock(Node.class);
    when(node.getId()).thenReturn(1l);
    List<Tag> tags = new ArrayList<Tag>();
    tags.add(new Tag("highway", "primary"));
    when(node.getTags()).thenReturn(tags);
    when(node.getLatitude()).thenReturn(1.0);
    when(node.getLongitude()).thenReturn(2.0);

    ESNode expected = ESNode.Builder.create().id(1l).location(1.0, 2.0)
        .addTag("highway", "primary").build();

    // Action
View Full Code Here

  public static void assertNodesEquals(Collection<Node> expected, Collection<Node> actual) {
    Assert.assertEquals(expected.size(), actual.size());
    Iterator<Node> expectedNodes = expected.iterator();
    Iterator<Node> actualNodes = actual.iterator();
    while (expectedNodes.hasNext() && actualNodes.hasNext()) {
      Node expectedNode = expectedNodes.next();
      Node actualNode = actualNodes.next();
      assertEquals(expectedNode, actualNode);
    }
  }
View Full Code Here

TOP

Related Classes of org.jdesktop.swingx.MultiSplitLayout$Node

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.