X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.modeling.ui%2Fscl%2FSimantics%2FTesting%2FBrowseContext.scl;h=3edb179fc295adc3c7ac223a70f04e49f857ad45;hb=53e9b3dac5648f360cd91478d9e6e7a495631b08;hp=a4b06495a4b6f155b1a4abd73170e960e1e1cde1;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.modeling.ui/scl/Simantics/Testing/BrowseContext.scl b/bundles/org.simantics.modeling.ui/scl/Simantics/Testing/BrowseContext.scl index a4b06495a..3edb179fc 100644 --- a/bundles/org.simantics.modeling.ui/scl/Simantics/Testing/BrowseContext.scl +++ b/bundles/org.simantics.modeling.ui/scl/Simantics/Testing/BrowseContext.scl @@ -76,13 +76,17 @@ importJava "org.eclipse.jface.resource.ImageDescriptor" where importJava "org.simantics.browsing.ui.content.ImageDecorator" where data ImageDecorator -importJava "org.eclipse.jface.resource.JFaceResources" where - getDefaultFontDescriptor :: FontDescriptor - importJava "org.eclipse.jface.resource.DeviceResourceDescriptor" where data FontDescriptor data ColorDescriptor +importJava "org.eclipse.jface.resource.FontDescriptor" where + @private + @JavaName createFrom + createFontDescriptorFrom :: String -> Integer -> Integer -> FontDescriptor + +defaultFontDescriptor = createFontDescriptorFrom "Arial" 12 0 + importJava "org.simantics.browsing.ui.content.LabelDecorator" where """ An interface for decorating aesthetic properties of an UI item, including the label text, font, background color and foreground color. @@ -96,7 +100,7 @@ importJava "org.simantics.browsing.ui.content.LabelDecorator" where decorateLabel :: LabelDecorator -> String -> String -> Integer -> String decorateForeground :: LabelDecorator -> a -> String -> Integer -> a decorateBackground :: LabelDecorator -> a -> String -> Integer -> a - decorateFont :: LabelDecorator -> a -> String -> Integer -> a + decorateFont :: LabelDecorator -> Maybe a -> String -> Integer -> Maybe a importJava "org.simantics.browsing.ui.CheckedState" where data CheckedState @@ -105,7 +109,8 @@ importJava "org.simantics.browsing.ui.content.Labeler$Modifier" where data Modifier getValue :: Modifier -> String - isValid :: Modifier -> String -> String + isValid :: Modifier -> String -> Maybe String + modify :: Modifier -> String -> () importJava "org.simantics.browsing.ui.model.browsecontexts.BrowseContexts" where toBrowseContextG :: Vector String -> BrowseContext @@ -118,3 +123,6 @@ createBrowseContext :: [Resource] -> BrowseContext createBrowseContext resource = do create resource +importJava "org.simantics.browsing.ui.common.NodeContextBuilder" where + buildWithInput :: a -> NodeContext +