1 import "Simantics/DB"
\r
3 import "Simantics/Testing/BuiltinKeys"
\r
5 importJava "org.simantics.browsing.ui.model.browsecontexts.BrowseContext" where
\r
7 BrowseContext holds all contributions related to given set of browse contexts.
\r
11 @JavaName getChildren
\r
13 Returns the possible children of the given NodeContext parameter.
\r
15 browseContextChildren :: BrowseContext -> NodeContext -> <ReadGraph> Collection NodeContext
\r
17 @JavaName getParents
\r
19 Returns the possible parents of the given NodeContext parameter.
\r
21 browseContextParents:: BrowseContext -> NodeContext -> <ReadGraph> Collection NodeContext
\r
25 Finds labels for the given NodeContext parameter.
\r
27 browseContextLabel :: BrowseContext -> NodeContext -> <ReadGraph> Map.T String String
\r
31 Finds @link ImageDescriptors for the given NodeContext parameter.
\r
33 browseContextImage :: BrowseContext -> NodeContext -> <ReadGraph> Map.T String ImageDescriptor
\r
35 @JavaName getCheckedState
\r
37 Finds if the given NodeContext is checked or not.
\r
39 browseContextCheckedState :: BrowseContext -> NodeContext -> <ReadGraph> CheckedState
\r
41 @JavaName getLabelDecorator
\r
43 Finds LabelDecorator for the given NodeContext parameter.
\r
45 browseContextLabelDecorator :: BrowseContext -> NodeContext -> <ReadGraph> LabelDecorator
\r
47 @JavaName getImageDecorator
\r
49 Finds ImageDecorator for the given NodeContext parameter.
\r
51 browseContextImageDecorator :: BrowseContext -> NodeContext -> <ReadGraph> ImageDecorator
\r
53 @JavaName getModifier
\r
55 Finds Modifier for the given NodeContext parameter.
\r
57 browseContextModifier :: BrowseContext -> NodeContext -> String -> <ReadGraph> Maybe Modifier
\r
60 create :: [Resource] -> <ReadGraph> BrowseContext
\r
62 importJava "org.simantics.browsing.ui.NodeContext" where
\r
64 A context used to represent a single visible UI item.
\r
69 Finds value with the specified key or <code>null</code> if there was no value for the key
\r
71 getConstant :: NodeContext -> ConstantKey -> <Proc> a
\r
73 importJava "org.eclipse.jface.resource.ImageDescriptor" where
\r
74 data ImageDescriptor
\r
76 importJava "org.simantics.browsing.ui.content.ImageDecorator" where
\r
79 importJava "org.eclipse.jface.resource.JFaceResources" where
\r
80 getDefaultFontDescriptor :: FontDescriptor
\r
82 importJava "org.eclipse.jface.resource.DeviceResourceDescriptor" where
\r
84 data ColorDescriptor
\r
86 importJava "org.simantics.browsing.ui.content.LabelDecorator" where
\r
88 An interface for decorating aesthetic properties of an UI item, including the label text, font, background color and foreground color.
\r
93 Decorates the given label with the name of the UI column which the label is for and the index of this label within its parenting INodeContext.
\r
94 Returns the decorated Label
\r
96 decorateLabel :: LabelDecorator -> String -> String -> Integer -> <Proc> String
\r
97 decorateForeground :: LabelDecorator -> a -> String -> Integer -> <Proc> a
\r
98 decorateBackground :: LabelDecorator -> a -> String -> Integer -> <Proc> a
\r
99 decorateFont :: LabelDecorator -> a -> String -> Integer -> <Proc> a
\r
101 importJava "org.simantics.browsing.ui.CheckedState" where
\r
104 importJava "org.simantics.browsing.ui.content.Labeler$Modifier" where
\r
107 getValue :: Modifier -> <Proc> String
\r
108 isValid :: Modifier -> String -> <Proc> String
\r
110 importJava "org.simantics.browsing.ui.model.browsecontexts.BrowseContexts" where
\r
111 toBrowseContextG :: Vector String -> <ReadGraph> BrowseContext
\r
112 getNodeContextForResource :: Resource -> <Proc> NodeContext
\r
115 Creates a new BrowseContext for the given Collection of Resources.
\r
117 createBrowseContext :: [Resource] -> <ReadGraph> BrowseContext
\r
118 createBrowseContext resource = do
\r