public IApplicationComponent CreateComponent() { var table = new Table <AimeAnnotationContainer>(); InitializeResultsTable(table); var coordinator = new AimDataServiceSearchCoordinator(); var criteriaComponent = new AimDataServiceSearchCriteriaComponent(coordinator); coordinator.CriteriaComponent = criteriaComponent; var topPane = new SplitPane("Search", criteriaComponent, true); var searchResultsComponent = new AimDataServiceSearchResultsComponent( ToolbarSite, MenuSite, ToolNamespace, new AimSearchResultsToolExtensionPoint(), table); coordinator.SearchResultsComponent = searchResultsComponent; var bottomPane = new SplitPane("Results", searchResultsComponent, false); return(new SplitComponentContainer(topPane, bottomPane, SplitOrientation.Horizontal)); }
private void RebuildSplitPane(Orientation orientation) { if (_splitPane != null) { _root.Widgets.Remove(_splitPane); _splitPane = null; } _splitPane = orientation == Orientation.Horizontal ? (SplitPane) new HorizontalSplitPane() : new VerticalSplitPane(); _splitPane.GridRow = 1; _splitPane.ProportionsChanged += SplitPaneOnProportionsChanged; for (var i = 0; i < Labels; ++i) { var label = new Label { Text = "Proportion" }; _splitPane.Widgets.Add(label); } UpdateProportions(); _root.Widgets.Add(_splitPane); }
/// <summary> /// Invoked when a new <see cref="ContentPane"/> has been created and needs to be added to the appropriate target collection. /// </summary> /// <param name="pane">The pane that was created and needs to be added to the appropriate collection</param> protected virtual void AddPane(ContentPane pane) { DocumentContentHost host = _target as DocumentContentHost; if (host != null) { ContentPane sibling = GetSiblingDocument(); TabGroupPane tgp = null; if (sibling != null) { tgp = LogicalTreeHelper.GetParent(sibling) as TabGroupPane; Debug.Assert(null != tgp, "Expected all documents to be within a tab group pane."); } if (null == tgp) { SplitPane sp = new SplitPane(); tgp = new TabGroupPane { Name = "Z" + Guid.NewGuid().ToString("N") }; sp.Panes.Add(tgp); DocumentContentHost dch = host; dch.Panes.Add(sp); } tgp.Items.Add(pane); RaiseInitializeContentPane(pane); } else { IList targetCollection = null; Debug.Assert(_target == null || !string.IsNullOrEmpty((string)_target.GetValue(FrameworkElement.NameProperty)), "The Name should be set so the container will not be removed when all the panes have been moved elsewhere. Otherwise new panes may not be displayed."); SplitPane splitPane = _target as SplitPane; if (splitPane != null) { targetCollection = splitPane.Panes; } else { TabGroupPane target = _target as TabGroupPane; if (target != null) { targetCollection = target.Items; } } if (null != targetCollection) { targetCollection.Add(pane); RaiseInitializeContentPane(pane); } } }
static SplitPane FindSplitPaneWithLocationOrCreate(XamDockManager dockManager, PaneLocation location) { SplitPane pane = FindSplitPaneWithLocation(dockManager, location); if (pane != null) { return(pane); } pane = new SplitPane(); XamDockManager.SetInitialLocation(pane, location.ToInitialPaneLocation()); return(pane); }
public void ShowFloatingWindow(object viewModel, object context = null, bool selectWhenShown = true) { ContentPane dockableWindow = CreateDockable(viewModel, context); SplitPane pane = new SplitPane(); XamDockManager.SetInitialLocation(pane, InitialPaneLocation.DockableFloating); pane.Panes.Add(dockableWindow); DockManager.Panes.Add(pane); if(selectWhenShown) { dockableWindow.Activate(); } }
public void ShowFloatingWindow(object viewModel, object context = null, bool selectWhenShown = true) { ContentPane dockableWindow = CreateDockable(viewModel, context); SplitPane pane = new SplitPane(); XamDockManager.SetInitialLocation(pane, InitialPaneLocation.DockableFloating); pane.Panes.Add(dockableWindow); DockManager.Panes.Add(pane); if (selectWhenShown) { dockableWindow.Activate(); } }
public static ATSWebBrowserContainer Create(IDesktopWindow desktopWindow) { var atsWebBrowserComponent = new ATSWebBrowserComponent(); var aimAnnotationComponent = AimAnnotationComponent.Create(desktopWindow, true); aimAnnotationComponent.Preview = true; atsWebBrowserComponent.AimAnnotationComponent = aimAnnotationComponent; var leftPane = new SplitPane(SR.TitleWebBrowserPane, atsWebBrowserComponent, 0.75f); var rightPane = new SplitPane(SR.TitleAimAnnotationPane, aimAnnotationComponent, 0.25f); return(new ATSWebBrowserContainer(leftPane, rightPane)); }
public void ShowDockedWindow(object viewModel, object context = null, bool selectWhenShown = true, InitialPaneLocation dockstate = InitialPaneLocation.DockedLeft) { ContentPane dockableWindow = CreateDockable(viewModel, context); SplitPane pane = XamDockManagerHelper.FindSplitPaneWithLocationOrCreate(GetDockingManager(_window), dockstate); pane.Panes.Add(dockableWindow); //If this is a new dockable location (there are no split panes for it) //we need to add it to the XamDockManager if (pane.Parent == null) { DockManager.Panes.Add(pane); } if (selectWhenShown) { dockableWindow.Activate(); } }
public static DicomExplorerComponent Create() { var serverTreeComponent = new ServerTreeComponent { ShowLocalServerNode = StudyStore.IsSupported }; bool hasEditPermission = PermissionsHelper.IsInRole(AuthorityTokens.Configuration.MyServers); serverTreeComponent.IsReadOnly = !hasEditPermission; var studyBrowserComponent = CreateComponentFromExtensionPoint <StudyBrowserComponentExtensionPoint, IStudyBrowserComponent>() ?? new StudyBrowserComponent(); serverTreeComponent.SelectedServerChanged += delegate { studyBrowserComponent.SelectedServers = serverTreeComponent.SelectedServers; }; var searchPanelComponent = CreateComponentFromExtensionPoint <SearchPanelComponentExtensionPoint, ISearchPanelComponent>() ?? new SearchPanelComponent(); SelectPriorsServerNode(serverTreeComponent); var leftPane = new SplitPane(SR.TitleServerTreePane, serverTreeComponent, 0.25f); var rightPane = new SplitPane(SR.TitleStudyBrowserPane, studyBrowserComponent, 0.75f); var bottomContainer = new SplitComponentContainer( leftPane, rightPane, SplitOrientation.Vertical); var topPane = new SplitPane(SR.TitleSearchPanelPane, searchPanelComponent, true); var bottomPane = new SplitPane(SR.TitleStudyNavigatorPane, bottomContainer, false); var component = new DicomExplorerComponent(topPane, bottomPane) { _studyBrowserComponent = studyBrowserComponent, _searchPanelComponent = searchPanelComponent, _serverTreeComponent = serverTreeComponent }; return(component); }
protected override IApplicationComponent CreateComponent() { AIMSearchCoordinator coordinator = new AIMSearchCoordinator(); AIMSearchCriteriaComponent AIMSearchCriteriaComponent = new AIMSearchCriteriaComponent(coordinator); Table <AIMSearchResult> table = new Table <AIMSearchResult>(); InitializeResultsTable(table); SearchResultsComponent resultsComponent = new SearchResultsComponent(ToolbarSite, MenuSite, ToolNamespace, new AIMSearchResultsToolExtensionPoint(), table); coordinator.SetSearchResultsComponent(resultsComponent); SplitPane topPane = new SplitPane("Search", AIMSearchCriteriaComponent, true); SplitPane bottomTopPane = new SplitPane("Results", resultsComponent, 2.0f); SplitPane bottopBottomPane = new SplitPane("Retrieve Progress", CreateRetrieveProgressComponent(), 1.0f); SplitPane bottomPane = new SplitPane("All Results", new SplitComponentContainer(bottomTopPane, bottopBottomPane, SplitOrientation.Horizontal), false); return(new SplitComponentContainer(topPane, bottomPane, SplitOrientation.Horizontal)); }
public SplitComponentContainerControl(SplitComponentContainer component) { _component = component; _vertical = _component.SplitOrientation == SplitOrientation.Vertical; _resetting = false; SplitPane pane1 = _component.Pane1; SplitPane pane2 = _component.Pane2; Control control1 = (Control)pane1.ComponentHost.ComponentView.GuiElement; control1.Dock = DockStyle.Fill; Control control2 = (Control)pane2.ComponentHost.ComponentView.GuiElement; control2.Dock = DockStyle.Fill; control1.FontChanged += ContainedControlFontChanged; control2.FontChanged += ContainedControlFontChanged; InitializeComponent(); // assemble the split container control _splitContainer.Orientation = _vertical ? Orientation.Vertical : Orientation.Horizontal; _splitContainer.Panel1.Controls.Add(control1); _splitContainer.Panel2.Controls.Add(control2); if (!PaneFixed) { // initialize the split ratio _splitRatio = pane1.Weight / (pane1.Weight + pane2.Weight); } else { FixPane(); } // initialize the splitter distance ResetSplitterDistance(); }
/// <summary> /// Invoked when a new <see cref="ContentPane"/> has been created and needs to be added to the appropriate target collection. /// </summary> /// <param name="pane">The pane that was created and needs to be added to the appropriate collection</param> protected virtual void AddPane(ContentPane pane) { DocumentContentHost host = _target as DocumentContentHost; if(host != null) { ContentPane sibling = GetSiblingDocument(); TabGroupPane tgp = null; if(sibling != null) { tgp = LogicalTreeHelper.GetParent(sibling) as TabGroupPane; Debug.Assert(null != tgp, "Expected all documents to be within a tab group pane."); } if(null == tgp) { SplitPane sp = new SplitPane(); tgp = new TabGroupPane { Name = "Z" + Guid.NewGuid().ToString("N") }; sp.Panes.Add(tgp); DocumentContentHost dch = host; dch.Panes.Add(sp); } tgp.Items.Add(pane); RaiseInitializeContentPane(pane); } else { IList targetCollection = null; Debug.Assert(_target == null || !string.IsNullOrEmpty((string)_target.GetValue(FrameworkElement.NameProperty)), "The Name should be set so the container will not be removed when all the panes have been moved elsewhere. Otherwise new panes may not be displayed."); SplitPane splitPane = _target as SplitPane; if(splitPane != null) { targetCollection = splitPane.Panes; } else { TabGroupPane target = _target as TabGroupPane; if(target != null) { targetCollection = target.Items; } } if(null != targetCollection) { targetCollection.Add(pane); RaiseInitializeContentPane(pane); } } }
protected override void InitializeCore() { ShowDebug = true; //Debugger.Launch(); _spriteBatch = new GdxSpriteBatch(Context.GraphicsDevice); _skin = new Skin(Context.GraphicsDevice, "Data/uiskin.json"); _texture1 = new TextureContext(Context.GraphicsDevice, "Data/badlogicsmall.jpg", true); _texture2 = new TextureContext(Context.GraphicsDevice, "Data/badlogic.jpg", true); TextureRegion image = new TextureRegion(_texture1); TextureRegion imageFlipped = new TextureRegion(image); imageFlipped.Flip(true, true); TextureRegion image2 = new TextureRegion(_texture2); _stage = new Stage(Context.GraphicsDevice.Viewport.Width, Context.GraphicsDevice.Viewport.Height, true, Context.GraphicsDevice); Context.Input.Processor = _stage; ImageButtonStyle style = new ImageButtonStyle(_skin.Get <ButtonStyle>()) { ImageUp = new TextureRegionDrawable(image), ImageDown = new TextureRegionDrawable(imageFlipped), }; ImageButton iconButton = new ImageButton(style); Button buttonMulti = new TextButton("Multi\nLine\nToggle", _skin, "toggle") { IsToggle = true, }; Button imgButton = new Button(new Image(image), _skin); Button imgToggleButton = new Button(new Image(image), _skin, "toggle") { IsToggle = true, }; Label myLabel = new Label("This is some text.", _skin); myLabel.TextWrapping = true; Table t = new Table(); t.Row(); t.Add(myLabel); t.Layout(); CheckBox checkbox = new CheckBox("Check me", _skin); Slider slider = new Slider(0, 10, 1, false, _skin); TextField textField = new TextField("", _skin) { MessageText = "Click here!", }; SelectBox dropdown = new SelectBox(selectEntries, _skin); Image imageActor = new Image(image2); ScrollPane scrollPane = new ScrollPane(imageActor); MonoGdx.Scene2D.UI.List list = new MonoGdx.Scene2D.UI.List(listEntries, _skin); ScrollPane scrollPane2 = new ScrollPane(list, _skin); //scrollPane2.FlickScroll = false; SplitPane splitPane = new SplitPane(scrollPane, scrollPane2, false, _skin, "default-horizontal"); _fpsLabel = new Label("fps:", _skin); Label passwordLabel = new Label("Textfield in password mode: ", _skin); TextField passwordField = new TextField("", _skin) { MessageText = "password", PasswordCharacter = '*', IsPasswordMode = true, }; Window window = new Window("Dialog", _skin); window.SetPosition(0, 0); window.Defaults().SpaceBottom = 10; window.Row().Configure.Fill().ExpandX(); window.Add(iconButton); window.Add(buttonMulti); window.Add(imgButton); window.Add(imgToggleButton); window.Row(); window.Add(checkbox); window.Add(slider).Configure.MinWidth(100).FillX().Colspan(3); window.Row(); window.Add(dropdown).Configure.MinWidth(100).FillX(); window.Add(textField).Configure.MinWidth(100).ExpandX().FillX().Colspan(3); window.Row(); window.Add(splitPane).Configure.Fill().Expand().Colspan(4).MaxHeight(200); window.Row(); window.Add(passwordLabel).Configure.Colspan(2); window.Add(passwordField).Configure.MinWidth(100).ExpandX().FillX().Colspan(2); window.Pack(); /*textField.KeyUp += (field, c) => { * if (c == '\n') * field.OnscreenKeyboard.Show(false); * };*/ _stage.AddActor(window); MonoGdx.Scene2D.UI.List list2 = new MonoGdx.Scene2D.UI.List(listEntries, _skin); ScrollPane scrollPane22 = new ScrollPane(list2, _skin); Window window2 = new Window("ScrollPane", _skin); window2.SetPosition(300, 300); window2.Defaults().SpaceBottom = 10; window2.Row().Configure.Fill().ExpandX(); window2.Add(scrollPane22).Configure.MaxHeight(250).MaxWidth(150); window2.Pack(); _stage.AddActor(window2); }
static PaneLocation GetSplitPaneLocation(SplitPane pane) { return(XamDockManager.GetPaneLocation(pane)); }
private DicomExplorerComponent(SplitPane pane1, SplitPane pane2) : base(pane1, pane2, Desktop.SplitOrientation.Horizontal) { }
static SplitPane FindSplitPaneWithLocationOrCreate(XamDockManager dockManager, PaneLocation location) { SplitPane pane = FindSplitPaneWithLocation(dockManager, location); if(pane != null) return pane; pane = new SplitPane(); XamDockManager.SetInitialLocation(pane, location.ToInitialPaneLocation()); return pane; }
internal SplitPaneProxy(SplitPane splitPane) : this() { _splitPane = splitPane; base.DataContext = _splitPane; }
private ATSWebBrowserContainer(SplitPane pane1, SplitPane pane2) : base(pane1, pane2, SplitOrientation.Vertical) { }
static PaneLocation GetSplitPaneLocation(SplitPane pane) { return XamDockManager.GetPaneLocation(pane); }
public void TestSplitPane() { SplitPane pane = new SplitPane("newPane"); Assert.AreEqual("newPane", pane.Name); Assert.AreEqual(String.Empty, pane.Text); Assert.IsTrue(pane is Component); SplitPane anotherPane = new SplitPane("anotherPane", "someText"); Assert.AreEqual("someText", anotherPane.Text); Assert.AreEqual("anotherPane", anotherPane.Name); Assert.AreEqual("splitPane", anotherPane.Type); Assert.AreEqual("splitPane(\"anotherPane\")", anotherPane.GetBaseComponentString()); Assert.AreEqual("getTestFixture().splitPane(\"anotherPane\")", anotherPane.GetQueryString()); Assert.AreEqual("getTestFixture().prefix(\"prefix\").splitPane(\"anotherPane\")", anotherPane.GetQueryString("prefix(\"prefix\")")); }